Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2221)

Unified Diff: chrome/browser/sync/sessions/sessions_sync_manager.h

Issue 367153005: Sync: Refactoring of DEVICE_INFO syncable type - Part 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed build issues in browser_tests Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 51d9a1e04f63d31ec4303f2bbf186eaac6f3fd03..e0f5bc72bb710dc0fac36509c5eb762f66703e5d 100644
--- a/chrome/browser/sync/sessions/sessions_sync_manager.h
+++ b/chrome/browser/sync/sessions/sessions_sync_manager.h
@@ -43,6 +43,7 @@ class TabNavigation;
namespace browser_sync {
class DataTypeErrorHandler;
+class LocalDeviceInfoProvider;
class SyncedTabDelegate;
class SyncedWindowDelegate;
class SyncedWindowDelegatesGetter;
@@ -82,21 +83,8 @@ class SessionsSyncManager : public syncer::SyncableService,
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,
- SyncInternalApiDelegate* delegate,
+ LocalDeviceInfoProvider* local_device_info_provider,
maniscalco 2014/07/08 21:17:53 local_device_info_provider must outlive this Sessi
stanisc 2014/07/09 21:58:36 Done.
scoped_ptr<LocalSessionEventRouter> router);
virtual ~SessionsSyncManager();
@@ -148,6 +136,8 @@ class SessionsSyncManager : public syncer::SyncableService,
FaviconCache* GetFaviconCache();
+ SyncedWindowDelegatesGetter* GetSyncedWindowDelegatesGetter() const;
+
// Triggers garbage collection of stale sessions (as defined by
// |stale_session_threshold_days_|). This is called automatically every
// time we start up (via AssociateModels) and when new sessions data is
@@ -354,7 +344,7 @@ class SessionsSyncManager : public syncer::SyncableService,
scoped_ptr<syncer::SyncErrorFactory> error_handler_;
scoped_ptr<syncer::SyncChangeProcessor> sync_processor_;
- const SyncInternalApiDelegate* const delegate_;
+ const LocalDeviceInfoProvider* const local_device_info_provider_;
// Unique client tag.
std::string current_machine_tag_;

Powered by Google App Engine
This is Rietveld 408576698