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

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: Fix use-after-free. 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 } 139 }
140 140
141 // TypedUrl sync is enabled by default. Register unless explicitly disabled, 141 // TypedUrl sync is enabled by default. Register unless explicitly disabled,
142 // or if saving history is disabled. 142 // or if saving history is disabled.
143 if (!profile_->GetPrefs()->GetBoolean(prefs::kSavingBrowserHistoryDisabled) && 143 if (!profile_->GetPrefs()->GetBoolean(prefs::kSavingBrowserHistoryDisabled) &&
144 !command_line_->HasSwitch(switches::kDisableSyncTypedUrls)) { 144 !command_line_->HasSwitch(switches::kDisableSyncTypedUrls)) {
145 pss->RegisterDataTypeController( 145 pss->RegisterDataTypeController(
146 new TypedUrlDataTypeController(this, profile_, pss)); 146 new TypedUrlDataTypeController(this, profile_, pss));
147 } 147 }
148 148
149 // Unless it is explicitly disabled, history delete directive sync is 149 // Delete directive sync is enabled by default. Register unless full history
150 // enabled whenever full history sync is enabled. 150 // sync is disabled.
151 if (command_line_->HasSwitch(switches::kHistoryEnableFullHistorySync) && 151 if (!command_line_->HasSwitch(switches::kHistoryDisableFullHistorySync)) {
152 !command_line_->HasSwitch(
153 switches::kDisableSyncHistoryDeleteDirectives)) {
154 pss->RegisterDataTypeController( 152 pss->RegisterDataTypeController(
155 new UIDataTypeController( 153 new UIDataTypeController(
156 syncer::HISTORY_DELETE_DIRECTIVES, this, profile_, pss)); 154 syncer::HISTORY_DELETE_DIRECTIVES, this, profile_, pss));
157 } 155 }
158 156
159 // Session sync is enabled by default. Register unless explicitly disabled. 157 // Session sync is enabled by default. Register unless explicitly disabled.
160 if (!command_line_->HasSwitch(switches::kDisableSyncTabs)) { 158 if (!command_line_->HasSwitch(switches::kDisableSyncTabs)) {
161 pss->RegisterDataTypeController( 159 pss->RegisterDataTypeController(
162 new ProxyDataTypeController(syncer::PROXY_TABS)); 160 new ProxyDataTypeController(syncer::PROXY_TABS));
163 pss->RegisterDataTypeController( 161 pss->RegisterDataTypeController(
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 ProfileSyncComponentsFactory::SyncComponents 433 ProfileSyncComponentsFactory::SyncComponents
436 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( 434 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents(
437 ProfileSyncService* profile_sync_service, 435 ProfileSyncService* profile_sync_service,
438 DataTypeErrorHandler* error_handler) { 436 DataTypeErrorHandler* error_handler) {
439 SessionModelAssociator* model_associator = 437 SessionModelAssociator* model_associator =
440 new SessionModelAssociator(profile_sync_service, error_handler); 438 new SessionModelAssociator(profile_sync_service, error_handler);
441 SessionChangeProcessor* change_processor = 439 SessionChangeProcessor* change_processor =
442 new SessionChangeProcessor(error_handler, model_associator); 440 new SessionChangeProcessor(error_handler, model_associator);
443 return SyncComponents(model_associator, change_processor); 441 return SyncComponents(model_associator, change_processor);
444 } 442 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698