Index: chrome/browser/sync/sessions/sessions_sync_manager.h |
diff --git a/chrome/browser/sync/sessions/sessions_sync_manager.h b/chrome/browser/sync/sessions/sessions_sync_manager.h |
index d94df572f34cf203559720349e845b06a55eda2b..51d9a1e04f63d31ec4303f2bbf186eaac6f3fd03 100644 |
--- a/chrome/browser/sync/sessions/sessions_sync_manager.h |
+++ b/chrome/browser/sync/sessions/sessions_sync_manager.h |
@@ -43,7 +43,6 @@ |
namespace browser_sync { |
class DataTypeErrorHandler; |
-class LocalDeviceInfoProvider; |
class SyncedTabDelegate; |
class SyncedWindowDelegate; |
class SyncedWindowDelegatesGetter; |
@@ -83,8 +82,21 @@ |
public OpenTabsUIDelegate, |
public LocalSessionEventHandler { |
public: |
+ // Isolates SessionsSyncManager from having to depend on sync internals. |
+ class SyncInternalApiDelegate { |
+ public: |
+ virtual ~SyncInternalApiDelegate() {} |
+ |
+ // Returns sync's representation of the local device info. |
+ // Return value is an empty scoped_ptr if the device info is unavailable. |
+ virtual scoped_ptr<DeviceInfo> GetLocalDeviceInfo() const = 0; |
+ |
+ // Used for creation of the machine tag for this local session. |
+ virtual std::string GetLocalSyncCacheGUID() const = 0; |
+ }; |
+ |
SessionsSyncManager(Profile* profile, |
- LocalDeviceInfoProvider* local_device, |
+ SyncInternalApiDelegate* delegate, |
scoped_ptr<LocalSessionEventRouter> router); |
virtual ~SessionsSyncManager(); |
@@ -135,8 +147,6 @@ |
static GURL GetCurrentFaviconURL(const SyncedTabDelegate& tab_delegate); |
FaviconCache* GetFaviconCache(); |
- |
- SyncedWindowDelegatesGetter* GetSyncedWindowDelegatesGetter() const; |
// Triggers garbage collection of stale sessions (as defined by |
// |stale_session_threshold_days_|). This is called automatically every |
@@ -344,8 +354,7 @@ |
scoped_ptr<syncer::SyncErrorFactory> error_handler_; |
scoped_ptr<syncer::SyncChangeProcessor> sync_processor_; |
- // Local device info provider, owned by ProfileSyncService. |
- const LocalDeviceInfoProvider* const local_device_; |
+ const SyncInternalApiDelegate* const delegate_; |
// Unique client tag. |
std::string current_machine_tag_; |