| 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);
|
| +}
|
| +
|
|
|