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

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

Issue 9395058: [Sync] Remove SyncableServiceAdapter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Self review Created 8 years, 10 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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 virtual browser_sync::GenericChangeProcessor* CreateGenericChangeProcessor( 72 virtual browser_sync::GenericChangeProcessor* CreateGenericChangeProcessor(
73 ProfileSyncService* profile_sync_service, 73 ProfileSyncService* profile_sync_service,
74 browser_sync::UnrecoverableErrorHandler* error_handler, 74 browser_sync::UnrecoverableErrorHandler* error_handler,
75 const base::WeakPtr<SyncableService>& local_service) = 0; 75 const base::WeakPtr<SyncableService>& local_service) = 0;
76 76
77 virtual browser_sync::SharedChangeProcessor* 77 virtual browser_sync::SharedChangeProcessor*
78 CreateSharedChangeProcessor() = 0; 78 CreateSharedChangeProcessor() = 0;
79 79
80 // Returns a weak pointer to the syncable service specified by |type|. 80 // Returns a weak pointer to the syncable service specified by |type|.
81 // Weak pointer may be unset if service is already destroyed. 81 // Weak pointer may be unset if service is already destroyed.
82 // Note: Should only be called on the same thread on which a datatype resides.
82 virtual base::WeakPtr<SyncableService> GetSyncableServiceForType( 83 virtual base::WeakPtr<SyncableService> GetSyncableServiceForType(
83 syncable::ModelType type) = 0; 84 syncable::ModelType type) = 0;
84 85
85 // Returns a weak pointer to the SyncableService associated with the datatype. 86 // Legacy datatypes that need to be converted to the SyncableService API.
86 // The SyncableService is not owned by Sync, but by the backend service
87 // itself.
88 virtual base::WeakPtr<SyncableService> GetAutofillProfileSyncableService(
89 WebDataService* web_data_service) const = 0;
90
91 // Returns a weak pointer to the SyncableService associated with the datatype.
92 // The SyncableService is not owned by Sync, but by the backend service
93 // itself.
94 virtual base::WeakPtr<SyncableService> GetAutocompleteSyncableService(
95 WebDataService* web_data_service) const = 0;
96
97 // Instantiates both a model associator and change processor for the
98 // bookmark data type. The pointers in the return struct are owned
99 // by the caller.
100 virtual SyncComponents CreateBookmarkSyncComponents( 87 virtual SyncComponents CreateBookmarkSyncComponents(
101 ProfileSyncService* profile_sync_service, 88 ProfileSyncService* profile_sync_service,
102 browser_sync::UnrecoverableErrorHandler* error_handler) = 0; 89 browser_sync::UnrecoverableErrorHandler* error_handler) = 0;
103
104 // Instantiates both a model associator and change processor for the
105 // extension or app setting data type. The pointers in the return struct are
106 // owned by the caller.
107 virtual SyncComponents CreateExtensionOrAppSettingSyncComponents(
108 // Either EXTENSION_SETTINGS or APP_SETTINGS.
109 syncable::ModelType type,
110 ProfileSyncService* profile_sync_service,
111 browser_sync::UnrecoverableErrorHandler* error_handler) = 0;
112
113 // Instantiates both a model associator and change processor for the
114 // extension or app data types. The pointers in the return struct are
115 // owned by the caller.
116 virtual SyncComponents CreateExtensionOrAppSyncComponents(
117 syncable::ModelType type, // Either EXTENSIONS or APPS.
118 ProfileSyncService* profile_sync_service,
119 browser_sync::UnrecoverableErrorHandler* error_handler) = 0;
120
121 // Instantiates both a model associator and change processor for the
122 // password data type. The pointers in the return struct are
123 // owned by the caller.
124 virtual SyncComponents CreatePasswordSyncComponents( 90 virtual SyncComponents CreatePasswordSyncComponents(
125 ProfileSyncService* profile_sync_service, 91 ProfileSyncService* profile_sync_service,
126 PasswordStore* password_store, 92 PasswordStore* password_store,
127 browser_sync::UnrecoverableErrorHandler* error_handler) = 0; 93 browser_sync::UnrecoverableErrorHandler* error_handler) = 0;
128
129 // Instantiates both a model associator and change processor for the
130 // preference data type. The pointers in the return struct are
131 // owned by the caller.
132 virtual SyncComponents CreatePreferenceSyncComponents(
133 ProfileSyncService* profile_sync_service,
134 browser_sync::UnrecoverableErrorHandler* error_handler) = 0;
135
136 // Instantiates both a model associator and change processor for the
137 // theme data type. The pointers in the return struct are
138 // owned by the caller.
139 virtual SyncComponents CreateThemeSyncComponents( 94 virtual SyncComponents CreateThemeSyncComponents(
140 ProfileSyncService* profile_sync_service, 95 ProfileSyncService* profile_sync_service,
141 browser_sync::UnrecoverableErrorHandler* error_handler) = 0; 96 browser_sync::UnrecoverableErrorHandler* error_handler) = 0;
142
143 // Instantiates both a model associator and change processor for the
144 // typed_url data type. The pointers in the return struct are owned
145 // by the caller.
146 virtual SyncComponents CreateTypedUrlSyncComponents( 97 virtual SyncComponents CreateTypedUrlSyncComponents(
147 ProfileSyncService* profile_sync_service, 98 ProfileSyncService* profile_sync_service,
148 history::HistoryBackend* history_backend, 99 history::HistoryBackend* history_backend,
149 browser_sync::UnrecoverableErrorHandler* error_handler) = 0; 100 browser_sync::UnrecoverableErrorHandler* error_handler) = 0;
150
151 // Instantiates both a model associator and change processor for the
152 // session data type. The pointers in the return struct are
153 // owned by the caller.
154 virtual SyncComponents CreateSessionSyncComponents( 101 virtual SyncComponents CreateSessionSyncComponents(
155 ProfileSyncService* profile_sync_service, 102 ProfileSyncService* profile_sync_service,
156 browser_sync::UnrecoverableErrorHandler* error_handler) = 0; 103 browser_sync::UnrecoverableErrorHandler* error_handler) = 0;
157
158 // Instantiates both a model associator and change processor for the search
159 // engine data type. The pointers in the return struct are owned by the
160 // caller.
161 virtual SyncComponents CreateSearchEngineSyncComponents(
162 ProfileSyncService* profile_sync_service,
163 browser_sync::UnrecoverableErrorHandler* error_handler) = 0;
164
165 // Instantiates both a model associator and change processor for the app
166 // notification data type. The pointers in the return struct are owned by the
167 // caller.
168 virtual SyncComponents CreateAppNotificationSyncComponents(
169 ProfileSyncService* profile_sync_service,
170 browser_sync::UnrecoverableErrorHandler* error_handler) = 0;
171 }; 104 };
172 105
173 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_H__ 106 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698