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

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

Issue 247433004: sync: remove CreateSharedChangeProcessor from ProfileSyncComponentsFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove SCPFactory Created 6 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/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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 new syncer::FakeAttachmentService( 456 new syncer::FakeAttachmentService(
457 CreateCustomAttachmentStoreForType(merge_result->model_type()))); 457 CreateCustomAttachmentStoreForType(merge_result->model_type())));
458 return new GenericChangeProcessor( 458 return new GenericChangeProcessor(
459 error_handler, 459 error_handler,
460 local_service, 460 local_service,
461 merge_result, 461 merge_result,
462 user_share, 462 user_share,
463 attachment_service.Pass()); 463 attachment_service.Pass());
464 } 464 }
465 465
466 browser_sync::SharedChangeProcessor* ProfileSyncComponentsFactoryImpl::
467 CreateSharedChangeProcessor() {
468 return new SharedChangeProcessor();
469 }
470
471 base::WeakPtr<syncer::SyncableService> ProfileSyncComponentsFactoryImpl:: 466 base::WeakPtr<syncer::SyncableService> ProfileSyncComponentsFactoryImpl::
472 GetSyncableServiceForType(syncer::ModelType type) { 467 GetSyncableServiceForType(syncer::ModelType type) {
473 if (!profile_) { // For tests. 468 if (!profile_) { // For tests.
474 return base::WeakPtr<syncer::SyncableService>(); 469 return base::WeakPtr<syncer::SyncableService>();
475 } 470 }
476 switch (type) { 471 switch (type) {
477 case syncer::PREFERENCES: 472 case syncer::PREFERENCES:
478 return PrefServiceSyncable::FromProfile( 473 return PrefServiceSyncable::FromProfile(
479 profile_)->GetSyncableService(syncer::PREFERENCES)->AsWeakPtr(); 474 profile_)->GetSyncableService(syncer::PREFERENCES)->AsWeakPtr();
480 case syncer::PRIORITY_PREFERENCES: 475 case syncer::PRIORITY_PREFERENCES:
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 new TypedUrlModelAssociator(profile_sync_service, 632 new TypedUrlModelAssociator(profile_sync_service,
638 history_backend, 633 history_backend,
639 error_handler); 634 error_handler);
640 TypedUrlChangeProcessor* change_processor = 635 TypedUrlChangeProcessor* change_processor =
641 new TypedUrlChangeProcessor(profile_, 636 new TypedUrlChangeProcessor(profile_,
642 model_associator, 637 model_associator,
643 history_backend, 638 history_backend,
644 error_handler); 639 error_handler);
645 return SyncComponents(model_associator, change_processor); 640 return SyncComponents(model_associator, change_processor);
646 } 641 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_components_factory_impl.h ('k') | chrome/browser/sync/profile_sync_components_factory_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698