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

Unified Diff: chrome/browser/sync/sessions2/session_data_type_controller2.h

Issue 74653002: sync: Add --enable-sync-sessions-v2 and necessary plumbing to use SessionsSyncManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup components factory Created 7 years, 1 month 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/sessions2/session_data_type_controller2.h
diff --git a/chrome/browser/sync/sessions2/session_data_type_controller2.h b/chrome/browser/sync/sessions2/session_data_type_controller2.h
new file mode 100644
index 0000000000000000000000000000000000000000..c58797b5d2b9a4d96c1e7fa13e6c7814eae62ada
--- /dev/null
+++ b/chrome/browser/sync/sessions2/session_data_type_controller2.h
@@ -0,0 +1,40 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_SYNC_SESSIONS2_SESSION_DATA_TYPE_CONTROLLER2_H_
+#define CHROME_BROWSER_SYNC_SESSIONS2_SESSION_DATA_TYPE_CONTROLLER2_H_
+
+#include "chrome/browser/sync/glue/ui_data_type_controller.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
+
+namespace browser_sync {
+
+// Overrides StartModels to avoid sync contention with sessions during
+// a session restore operation at startup.
+class SessionDataTypeController2 : public UIDataTypeController,
+ public content::NotificationObserver {
+ public:
+ SessionDataTypeController2(ProfileSyncComponentsFactory* factory,
+ Profile* profile,
+ ProfileSyncService* service);
+
+ // NotificationObserver interface.
+ virtual void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
+
+ protected:
+ virtual ~SessionDataTypeController2();
+ virtual bool StartModels() OVERRIDE;
+
+ private:
+ content::NotificationRegistrar notification_registrar_;
+ DISALLOW_COPY_AND_ASSIGN(SessionDataTypeController2);
+};
+
+} // namespace browser_sync
+
+#endif // CHROME_BROWSER_SYNC_SESSIONS2_SESSION_DATA_TYPE_CONTROLLER2_H_
+

Powered by Google App Engine
This is Rietveld 408576698