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

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

Issue 9232011: sync: Make ProfileSyncService a ProfileKeyedService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 11 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) 2011 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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 struct SyncComponents { 50 struct SyncComponents {
51 browser_sync::AssociatorInterface* model_associator; 51 browser_sync::AssociatorInterface* model_associator;
52 browser_sync::ChangeProcessor* change_processor; 52 browser_sync::ChangeProcessor* change_processor;
53 SyncComponents(browser_sync::AssociatorInterface* ma, 53 SyncComponents(browser_sync::AssociatorInterface* ma,
54 browser_sync::ChangeProcessor* cp) 54 browser_sync::ChangeProcessor* cp)
55 : model_associator(ma), change_processor(cp) {} 55 : model_associator(ma), change_processor(cp) {}
56 }; 56 };
57 57
58 virtual ~ProfileSyncComponentsFactory() {} 58 virtual ~ProfileSyncComponentsFactory() {}
59 59
60 // Instantiates a new ProfileSyncService. The return pointer is owned by the
61 // caller.
62 // TODO(tim): Bug 93922. Remove this method in favor of a
63 // ProfileSyncServiceFactory singleton.
64 virtual ProfileSyncService* CreateProfileSyncService() = 0;
65
66 // Creates and registers enabled datatypes with the provided 60 // Creates and registers enabled datatypes with the provided
67 // ProfileSyncService. 61 // ProfileSyncService.
68 virtual void RegisterDataTypes(ProfileSyncService* pss) = 0; 62 virtual void RegisterDataTypes(ProfileSyncService* pss) = 0;
69 63
70 // Instantiates a new DataTypeManager with a SyncBackendHost and a 64 // Instantiates a new DataTypeManager with a SyncBackendHost and a
71 // list of data type controllers. The return pointer is owned by 65 // list of data type controllers. The return pointer is owned by
72 // the caller. 66 // the caller.
73 virtual browser_sync::DataTypeManager* CreateDataTypeManager( 67 virtual browser_sync::DataTypeManager* CreateDataTypeManager(
74 browser_sync::SyncBackendHost* backend, 68 browser_sync::SyncBackendHost* backend,
75 const browser_sync::DataTypeController::TypeMap* controllers) = 0; 69 const browser_sync::DataTypeController::TypeMap* controllers) = 0;
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 166
173 // Instantiates both a model associator and change processor for the app 167 // Instantiates both a model associator and change processor for the app
174 // notification data type. The pointers in the return struct are owned by the 168 // notification data type. The pointers in the return struct are owned by the
175 // caller. 169 // caller.
176 virtual SyncComponents CreateAppNotificationSyncComponents( 170 virtual SyncComponents CreateAppNotificationSyncComponents(
177 ProfileSyncService* profile_sync_service, 171 ProfileSyncService* profile_sync_service,
178 browser_sync::UnrecoverableErrorHandler* error_handler) = 0; 172 browser_sync::UnrecoverableErrorHandler* error_handler) = 0;
179 }; 173 };
180 174
181 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_H__ 175 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_H__
OLDNEW
« no previous file with comments | « chrome/browser/sync/abstract_profile_sync_service_test.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