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

Side by Side Diff: chrome/browser/sync/profile_sync_components_factory_impl.cc

Issue 14344002: Sync: Turn on full history sync by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/command_line.h" 5 #include "base/command_line.h"
6 #include "build/build_config.h" 6 #include "build/build_config.h"
7 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 7 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
8 #include "chrome/browser/extensions/api/storage/settings_frontend.h" 8 #include "chrome/browser/extensions/api/storage/settings_frontend.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/extension_system.h" 10 #include "chrome/browser/extensions/extension_system.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 } 138 }
139 139
140 // TypedUrl sync is enabled by default. Register unless explicitly disabled, 140 // TypedUrl sync is enabled by default. Register unless explicitly disabled,
141 // or if saving history is disabled. 141 // or if saving history is disabled.
142 if (!profile_->GetPrefs()->GetBoolean(prefs::kSavingBrowserHistoryDisabled) && 142 if (!profile_->GetPrefs()->GetBoolean(prefs::kSavingBrowserHistoryDisabled) &&
143 !command_line_->HasSwitch(switches::kDisableSyncTypedUrls)) { 143 !command_line_->HasSwitch(switches::kDisableSyncTypedUrls)) {
144 pss->RegisterDataTypeController( 144 pss->RegisterDataTypeController(
145 new TypedUrlDataTypeController(this, profile_, pss)); 145 new TypedUrlDataTypeController(this, profile_, pss));
146 } 146 }
147 147
148 // Unless it is explicitly disabled, history delete directive sync is 148 // Delete directive sync is enabled by default. Register unless full history
149 // enabled whenever full history sync is enabled. 149 // sync is disabled.
150 if (command_line_->HasSwitch(switches::kHistoryEnableFullHistorySync) && 150 if (!command_line_->HasSwitch(switches::kHistoryDisableFullHistorySync)) {
151 !command_line_->HasSwitch(
152 switches::kDisableSyncHistoryDeleteDirectives)) {
153 pss->RegisterDataTypeController( 151 pss->RegisterDataTypeController(
154 new UIDataTypeController( 152 new UIDataTypeController(
155 syncer::HISTORY_DELETE_DIRECTIVES, this, profile_, pss)); 153 syncer::HISTORY_DELETE_DIRECTIVES, this, profile_, pss));
156 } 154 }
157 155
158 // Session sync is enabled by default. Register unless explicitly disabled. 156 // Session sync is enabled by default. Register unless explicitly disabled.
159 if (!command_line_->HasSwitch(switches::kDisableSyncTabs)) { 157 if (!command_line_->HasSwitch(switches::kDisableSyncTabs)) {
160 pss->RegisterDataTypeController( 158 pss->RegisterDataTypeController(
161 new ProxyDataTypeController(syncer::PROXY_TABS)); 159 new ProxyDataTypeController(syncer::PROXY_TABS));
162 pss->RegisterDataTypeController( 160 pss->RegisterDataTypeController(
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 ProfileSyncComponentsFactory::SyncComponents 429 ProfileSyncComponentsFactory::SyncComponents
432 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( 430 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents(
433 ProfileSyncService* profile_sync_service, 431 ProfileSyncService* profile_sync_service,
434 DataTypeErrorHandler* error_handler) { 432 DataTypeErrorHandler* error_handler) {
435 SessionModelAssociator* model_associator = 433 SessionModelAssociator* model_associator =
436 new SessionModelAssociator(profile_sync_service, error_handler); 434 new SessionModelAssociator(profile_sync_service, error_handler);
437 SessionChangeProcessor* change_processor = 435 SessionChangeProcessor* change_processor =
438 new SessionChangeProcessor(error_handler, model_associator); 436 new SessionChangeProcessor(error_handler, model_associator);
439 return SyncComponents(model_associator, change_processor); 437 return SyncComponents(model_associator, change_processor);
440 } 438 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698