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

Side by Side Diff: chrome/browser/sync/profile_sync_components_factory.h

Issue 10834351: [sync] Divorce DataTypeManager from NotificationService notifications by creating a new DataTypeMa… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restore expectations in DTMImpl unittest + Treat observer_ as const Created 8 years, 4 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 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_H__ 5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_H__
6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_H__ 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_H__
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "chrome/browser/sync/glue/data_type_controller.h" 11 #include "chrome/browser/sync/glue/data_type_controller.h"
12 #include "chrome/browser/sync/glue/data_type_error_handler.h" 12 #include "chrome/browser/sync/glue/data_type_error_handler.h"
13 #include "sync/internal_api/public/util/unrecoverable_error_handler.h" 13 #include "sync/internal_api/public/util/unrecoverable_error_handler.h"
14 14
15 class PasswordStore; 15 class PasswordStore;
16 class ProfileSyncService; 16 class ProfileSyncService;
17 class WebDataService; 17 class WebDataService;
18 18
19 namespace browser_sync { 19 namespace browser_sync {
20 class AssociatorInterface; 20 class AssociatorInterface;
21 class ChangeProcessor; 21 class ChangeProcessor;
22 class DataTypeManager; 22 class DataTypeManager;
23 class DataTypeManagerObserver;
23 class GenericChangeProcessor; 24 class GenericChangeProcessor;
24 class SharedChangeProcessor; 25 class SharedChangeProcessor;
25 class SyncBackendHost; 26 class SyncBackendHost;
26 class DataTypeErrorHandler; 27 class DataTypeErrorHandler;
27 } 28 }
28 29
29 namespace syncer { 30 namespace syncer {
30 class SyncableService; 31 class SyncableService;
31 } 32 }
32 33
(...skipping 24 matching lines...) Expand all
57 browser_sync::ChangeProcessor* cp) 58 browser_sync::ChangeProcessor* cp)
58 : model_associator(ma), change_processor(cp) {} 59 : model_associator(ma), change_processor(cp) {}
59 }; 60 };
60 61
61 virtual ~ProfileSyncComponentsFactory() {} 62 virtual ~ProfileSyncComponentsFactory() {}
62 63
63 // Creates and registers enabled datatypes with the provided 64 // Creates and registers enabled datatypes with the provided
64 // ProfileSyncService. 65 // ProfileSyncService.
65 virtual void RegisterDataTypes(ProfileSyncService* pss) = 0; 66 virtual void RegisterDataTypes(ProfileSyncService* pss) = 0;
66 67
67 // Instantiates a new DataTypeManager with a SyncBackendHost and a 68 // Instantiates a new DataTypeManager with a SyncBackendHost, a list of data
68 // list of data type controllers. The return pointer is owned by 69 // type controllers and a DataTypeManagerObserver. The return pointer is
69 // the caller. 70 // owned by the caller.
70 virtual browser_sync::DataTypeManager* CreateDataTypeManager( 71 virtual browser_sync::DataTypeManager* CreateDataTypeManager(
71 browser_sync::SyncBackendHost* backend, 72 browser_sync::SyncBackendHost* backend,
72 const browser_sync::DataTypeController::TypeMap* controllers) = 0; 73 const browser_sync::DataTypeController::TypeMap* controllers,
74 browser_sync::DataTypeManagerObserver* observer) = 0;
73 75
74 // Creating this in the factory helps us mock it out in testing. 76 // Creating this in the factory helps us mock it out in testing.
75 virtual browser_sync::GenericChangeProcessor* CreateGenericChangeProcessor( 77 virtual browser_sync::GenericChangeProcessor* CreateGenericChangeProcessor(
76 ProfileSyncService* profile_sync_service, 78 ProfileSyncService* profile_sync_service,
77 browser_sync::DataTypeErrorHandler* error_handler, 79 browser_sync::DataTypeErrorHandler* error_handler,
78 const base::WeakPtr<syncer::SyncableService>& local_service) = 0; 80 const base::WeakPtr<syncer::SyncableService>& local_service) = 0;
79 81
80 virtual browser_sync::SharedChangeProcessor* 82 virtual browser_sync::SharedChangeProcessor*
81 CreateSharedChangeProcessor() = 0; 83 CreateSharedChangeProcessor() = 0;
82 84
(...skipping 19 matching lines...) Expand all
102 virtual SyncComponents CreateTypedUrlSyncComponents( 104 virtual SyncComponents CreateTypedUrlSyncComponents(
103 ProfileSyncService* profile_sync_service, 105 ProfileSyncService* profile_sync_service,
104 history::HistoryBackend* history_backend, 106 history::HistoryBackend* history_backend,
105 browser_sync::DataTypeErrorHandler* error_handler) = 0; 107 browser_sync::DataTypeErrorHandler* error_handler) = 0;
106 virtual SyncComponents CreateSessionSyncComponents( 108 virtual SyncComponents CreateSessionSyncComponents(
107 ProfileSyncService* profile_sync_service, 109 ProfileSyncService* profile_sync_service,
108 browser_sync::DataTypeErrorHandler* error_handler) = 0; 110 browser_sync::DataTypeErrorHandler* error_handler) = 0;
109 }; 111 };
110 112
111 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_H__ 113 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_H__
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/data_type_manager_observer.h ('k') | chrome/browser/sync/profile_sync_components_factory_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698