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

Unified Diff: chrome/browser/sync/profile_sync_factory_impl.cc

Issue 3168009: Added classes to enable session sync functionality.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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/profile_sync_factory_impl.cc
===================================================================
--- chrome/browser/sync/profile_sync_factory_impl.cc (revision 56023)
+++ chrome/browser/sync/profile_sync_factory_impl.cc (working copy)
@@ -22,6 +22,9 @@
#include "chrome/browser/sync/glue/preference_change_processor.h"
#include "chrome/browser/sync/glue/preference_data_type_controller.h"
#include "chrome/browser/sync/glue/preference_model_associator.h"
+#include "chrome/browser/sync/glue/session_change_processor.h"
+#include "chrome/browser/sync/glue/session_data_type_controller.h"
+#include "chrome/browser/sync/glue/session_model_associator.h"
#include "chrome/browser/sync/glue/sync_backend_host.h"
#include "chrome/browser/sync/glue/theme_change_processor.h"
#include "chrome/browser/sync/glue/theme_data_type_controller.h"
@@ -52,6 +55,9 @@
using browser_sync::PreferenceChangeProcessor;
using browser_sync::PreferenceDataTypeController;
using browser_sync::PreferenceModelAssociator;
+using browser_sync::SessionChangeProcessor;
+using browser_sync::SessionDataTypeController;
+using browser_sync::SessionModelAssociator;
using browser_sync::SyncBackendHost;
using browser_sync::ThemeChangeProcessor;
using browser_sync::ThemeDataTypeController;
@@ -119,6 +125,12 @@
new TypedUrlDataTypeController(this, profile_, pss));
}
+ // Session sync is enabled by default. Register unless explicitly
+ // disabled.
+ if (!command_line_->HasSwitch(switches::kDisableSyncSessions)) {
+ pss->RegisterDataTypeController(
+ new SessionDataTypeController(this, pss));
+ }
return pss;
}
@@ -222,3 +234,15 @@
error_handler);
return SyncComponents(model_associator, change_processor);
}
+
+ProfileSyncFactory::SyncComponents
+ProfileSyncFactoryImpl::CreateSessionSyncComponents(
+ ProfileSyncService* profile_sync_service,
+ UnrecoverableErrorHandler* error_handler) {
+ SessionModelAssociator* model_associator =
+ new SessionModelAssociator(profile_sync_service);
+ SessionChangeProcessor* change_processor =
+ new SessionChangeProcessor(error_handler, model_associator);
+ return SyncComponents(model_associator, change_processor);
+}
+
« no previous file with comments | « chrome/browser/sync/profile_sync_factory_impl.h ('k') | chrome/browser/sync/profile_sync_factory_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698