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

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

Issue 493293002: Enable invalidations for supervised user settings on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 'nother compile fix Created 6 years, 3 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/bookmarks/enhanced_bookmarks_features.h" 8 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h"
9 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" 9 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h"
10 #include "chrome/browser/history/history_service.h" 10 #include "chrome/browser/history/history_service.h"
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 syncer::ARTICLES, 269 syncer::ARTICLES,
270 this)); 270 this));
271 } 271 }
272 272
273 #if defined(ENABLE_MANAGED_USERS) 273 #if defined(ENABLE_MANAGED_USERS)
274 pss->RegisterDataTypeController( 274 pss->RegisterDataTypeController(
275 new SupervisedUserSyncDataTypeController( 275 new SupervisedUserSyncDataTypeController(
276 syncer::SUPERVISED_USER_SETTINGS, 276 syncer::SUPERVISED_USER_SETTINGS,
277 this, 277 this,
278 profile_)); 278 profile_));
279 pss->RegisterDataTypeController(
280 new SupervisedUserSyncDataTypeController(
281 syncer::SUPERVISED_USERS,
282 this,
283 profile_));
284 pss->RegisterDataTypeController(
285 new SupervisedUserSyncDataTypeController(
286 syncer::SUPERVISED_USER_SHARED_SETTINGS,
287 this,
288 profile_));
289 #endif 279 #endif
290 } 280 }
291 281
292 void ProfileSyncComponentsFactoryImpl::RegisterDesktopDataTypes( 282 void ProfileSyncComponentsFactoryImpl::RegisterDesktopDataTypes(
293 syncer::ModelTypeSet disabled_types, 283 syncer::ModelTypeSet disabled_types,
294 syncer::ModelTypeSet enabled_types, 284 syncer::ModelTypeSet enabled_types,
295 ProfileSyncService* pss) { 285 ProfileSyncService* pss) {
296 // App sync is enabled by default. Register unless explicitly 286 // App sync is enabled by default. Register unless explicitly
297 // disabled. 287 // disabled.
298 if (!disabled_types.Has(syncer::APPS)) { 288 if (!disabled_types.Has(syncer::APPS)) {
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 // Dictionary sync is enabled by default. 380 // Dictionary sync is enabled by default.
391 if (!disabled_types.Has(syncer::DICTIONARY)) { 381 if (!disabled_types.Has(syncer::DICTIONARY)) {
392 pss->RegisterDataTypeController( 382 pss->RegisterDataTypeController(
393 new UIDataTypeController( 383 new UIDataTypeController(
394 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), 384 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI),
395 base::Bind(&ChromeReportUnrecoverableError), 385 base::Bind(&ChromeReportUnrecoverableError),
396 syncer::DICTIONARY, 386 syncer::DICTIONARY,
397 this)); 387 this));
398 } 388 }
399 #endif 389 #endif
390
391 #if defined(ENABLE_MANAGED_USERS)
392 pss->RegisterDataTypeController(
393 new SupervisedUserSyncDataTypeController(
394 syncer::SUPERVISED_USERS,
395 this,
396 profile_));
397 pss->RegisterDataTypeController(
398 new SupervisedUserSyncDataTypeController(
399 syncer::SUPERVISED_USER_SHARED_SETTINGS,
400 this,
401 profile_));
402 #endif
400 } 403 }
401 404
402 DataTypeManager* ProfileSyncComponentsFactoryImpl::CreateDataTypeManager( 405 DataTypeManager* ProfileSyncComponentsFactoryImpl::CreateDataTypeManager(
403 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& 406 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>&
404 debug_info_listener, 407 debug_info_listener,
405 const DataTypeController::TypeMap* controllers, 408 const DataTypeController::TypeMap* controllers,
406 const sync_driver::DataTypeEncryptionHandler* encryption_handler, 409 const sync_driver::DataTypeEncryptionHandler* encryption_handler,
407 SyncBackendHost* backend, 410 SyncBackendHost* backend,
408 DataTypeManagerObserver* observer, 411 DataTypeManagerObserver* observer,
409 sync_driver::FailedDataTypesHandler* failed_data_types_handler) { 412 sync_driver::FailedDataTypesHandler* failed_data_types_handler) {
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 new TypedUrlModelAssociator(profile_sync_service, 677 new TypedUrlModelAssociator(profile_sync_service,
675 history_backend, 678 history_backend,
676 error_handler); 679 error_handler);
677 TypedUrlChangeProcessor* change_processor = 680 TypedUrlChangeProcessor* change_processor =
678 new TypedUrlChangeProcessor(profile_, 681 new TypedUrlChangeProcessor(profile_,
679 model_associator, 682 model_associator,
680 history_backend, 683 history_backend,
681 error_handler); 684 error_handler);
682 return SyncComponents(model_associator, change_processor); 685 return SyncComponents(model_associator, change_processor);
683 } 686 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698