[SendTabToSelf] Plumb device support for SendTabToSelf feature in DeviceInfo
A callback is used to populate the DeviceInfo with the latest state
on support for SendTabToSelf feature on the device. The information is used
to determine which set of devices tabs can be shared to.
Change-Id: Ib0f9093ae20ff8fc05494222789107a215057d79
Bug: 937004
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1570478
Commit-Queue: Tanya Gupta <[email protected]>
Reviewed-by: Peter Lee <[email protected]>
Reviewed-by: sebsg <[email protected]>
Reviewed-by: Karan Bhatia <[email protected]>
Reviewed-by: Mikel Astiz <[email protected]>
Cr-Commit-Position: refs/heads/master@{#652375}
diff --git a/components/sync/device_info/device_info.h b/components/sync/device_info/device_info.h
index 8122127..8a699d6 100644
--- a/components/sync/device_info/device_info.h
+++ b/components/sync/device_info/device_info.h
@@ -26,7 +26,8 @@
const std::string& chrome_version,
const std::string& sync_user_agent,
const sync_pb::SyncEnums::DeviceType device_type,
- const std::string& signin_scoped_device_id);
+ const std::string& signin_scoped_device_id,
+ bool send_tab_to_self_receiving_enabled);
~DeviceInfo();
// Sync specific unique identifier for the device. Note if a device
@@ -56,6 +57,9 @@
// annotating login scoped refresh token.
const std::string& signin_scoped_device_id() const;
+ // Whether the receiving side of the SendTabToSelf feature is enabled.
+ bool send_tab_to_self_receiving_enabled() const;
+
// Gets the OS in string form.
std::string GetOSString() const;
@@ -71,6 +75,8 @@
// be used for tracking.
void set_public_id(const std::string& id);
+ void set_send_tab_to_self_receiving_enabled(bool new_value);
+
// Converts the |DeviceInfo| values to a JS friendly DictionaryValue,
// which extension APIs can expose to third party apps.
std::unique_ptr<base::DictionaryValue> ToValue();
@@ -94,6 +100,8 @@
// and they are also reset when app/extension is uninstalled.
std::string public_id_;
+ bool send_tab_to_self_receiving_enabled_;
+
DISALLOW_COPY_AND_ASSIGN(DeviceInfo);
};