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

Side by Side Diff: sync/internal_api/public/sync_manager.h

Issue 442403003: Update SyncManager::Init to use a GURL for the sync server URL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix sync_client.cc too. Created 6 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ 5 #ifndef SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_
6 #define SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ 6 #define SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 14 matching lines...) Expand all
25 #include "sync/internal_api/public/engine/model_safe_worker.h" 25 #include "sync/internal_api/public/engine/model_safe_worker.h"
26 #include "sync/internal_api/public/engine/sync_status.h" 26 #include "sync/internal_api/public/engine/sync_status.h"
27 #include "sync/internal_api/public/events/protocol_event.h" 27 #include "sync/internal_api/public/events/protocol_event.h"
28 #include "sync/internal_api/public/sync_context_proxy.h" 28 #include "sync/internal_api/public/sync_context_proxy.h"
29 #include "sync/internal_api/public/sync_encryption_handler.h" 29 #include "sync/internal_api/public/sync_encryption_handler.h"
30 #include "sync/internal_api/public/util/report_unrecoverable_error_function.h" 30 #include "sync/internal_api/public/util/report_unrecoverable_error_function.h"
31 #include "sync/internal_api/public/util/unrecoverable_error_handler.h" 31 #include "sync/internal_api/public/util/unrecoverable_error_handler.h"
32 #include "sync/internal_api/public/util/weak_handle.h" 32 #include "sync/internal_api/public/util/weak_handle.h"
33 #include "sync/protocol/sync_protocol_error.h" 33 #include "sync/protocol/sync_protocol_error.h"
34 34
35 class GURL;
36
35 namespace sync_pb { 37 namespace sync_pb {
36 class EncryptedData; 38 class EncryptedData;
37 } // namespace sync_pb 39 } // namespace sync_pb
38 40
39 namespace syncer { 41 namespace syncer {
40 42
41 class BaseTransaction; 43 class BaseTransaction;
42 class CancelationSignal; 44 class CancelationSignal;
43 class DataTypeDebugInfoListener; 45 class DataTypeDebugInfoListener;
44 class Encryptor; 46 class Encryptor;
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 221
220 SyncManager(); 222 SyncManager();
221 virtual ~SyncManager(); 223 virtual ~SyncManager();
222 224
223 // Initialize the sync manager. |database_location| specifies the path of 225 // Initialize the sync manager. |database_location| specifies the path of
224 // the directory in which to locate a sqlite repository storing the syncer 226 // the directory in which to locate a sqlite repository storing the syncer
225 // backend state. Initialization will open the database, or create it if it 227 // backend state. Initialization will open the database, or create it if it
226 // does not already exist. Returns false on failure. 228 // does not already exist. Returns false on failure.
227 // |event_handler| is the JsEventHandler used to propagate events to 229 // |event_handler| is the JsEventHandler used to propagate events to
228 // chrome://sync-internals. |event_handler| may be uninitialized. 230 // chrome://sync-internals. |event_handler| may be uninitialized.
229 // |sync_server_and_path| and |sync_server_port| represent the Chrome sync 231 // |service_url| is the URL of the Chrome Sync Server.
230 // server to use, and |use_ssl| specifies whether to communicate securely;
231 // the default is false.
232 // |post_factory| will be owned internally and used to create 232 // |post_factory| will be owned internally and used to create
233 // instances of an HttpPostProvider. 233 // instances of an HttpPostProvider.
234 // |model_safe_worker| ownership is given to the SyncManager. 234 // |model_safe_worker| ownership is given to the SyncManager.
235 // |user_agent| is a 7-bit ASCII string suitable for use as the User-Agent 235 // |user_agent| is a 7-bit ASCII string suitable for use as the User-Agent
236 // HTTP header. Used internally when collecting stats to classify clients. 236 // HTTP header. Used internally when collecting stats to classify clients.
237 // |invalidator| is owned and used to listen for invalidations. 237 // |invalidator| is owned and used to listen for invalidations.
238 // |invalidator_client_id| is used to unqiuely identify this client to the 238 // |invalidator_client_id| is used to unqiuely identify this client to the
239 // invalidation notification server. 239 // invalidation notification server.
240 // |restored_key_for_bootstrapping| is the key used to boostrap the 240 // |restored_key_for_bootstrapping| is the key used to boostrap the
241 // cryptographer 241 // cryptographer
242 // |keystore_encryption_enabled| determines whether we enable the keystore 242 // |keystore_encryption_enabled| determines whether we enable the keystore
243 // encryption functionality in the cryptographer/nigori. 243 // encryption functionality in the cryptographer/nigori.
244 // |report_unrecoverable_error_function| may be NULL. 244 // |report_unrecoverable_error_function| may be NULL.
245 // |cancelation_signal| carries shutdown requests across threads. This one 245 // |cancelation_signal| carries shutdown requests across threads. This one
246 // will be used to cut short any network I/O and tell the syncer to exit 246 // will be used to cut short any network I/O and tell the syncer to exit
247 // early. 247 // early.
248 // 248 //
249 // TODO(akalin): Replace the |post_factory| parameter with a 249 // TODO(akalin): Replace the |post_factory| parameter with a
250 // URLFetcher parameter. 250 // URLFetcher parameter.
251 virtual void Init( 251 virtual void Init(
252 const base::FilePath& database_location, 252 const base::FilePath& database_location,
253 const WeakHandle<JsEventHandler>& event_handler, 253 const WeakHandle<JsEventHandler>& event_handler,
254 const std::string& sync_server_and_path, 254 const GURL& service_url,
255 int sync_server_port,
256 bool use_ssl,
257 scoped_ptr<HttpPostProviderFactory> post_factory, 255 scoped_ptr<HttpPostProviderFactory> post_factory,
258 const std::vector<scoped_refptr<ModelSafeWorker> >& workers, 256 const std::vector<scoped_refptr<ModelSafeWorker> >& workers,
259 ExtensionsActivity* extensions_activity, 257 ExtensionsActivity* extensions_activity,
260 ChangeDelegate* change_delegate, 258 ChangeDelegate* change_delegate,
261 const SyncCredentials& credentials, 259 const SyncCredentials& credentials,
262 const std::string& invalidator_client_id, 260 const std::string& invalidator_client_id,
263 const std::string& restored_key_for_bootstrapping, 261 const std::string& restored_key_for_bootstrapping,
264 const std::string& restored_keystore_key_for_bootstrapping, 262 const std::string& restored_keystore_key_for_bootstrapping,
265 InternalComponentsFactory* internal_components_factory, 263 InternalComponentsFactory* internal_components_factory,
266 Encryptor* encryptor, 264 Encryptor* encryptor,
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 syncer::TypeDebugInfoObserver* observer) = 0; 376 syncer::TypeDebugInfoObserver* observer) = 0;
379 377
380 // Request that all current counter values be emitted as though they had just 378 // Request that all current counter values be emitted as though they had just
381 // been updated. Useful for initializing new observers' state. 379 // been updated. Useful for initializing new observers' state.
382 virtual void RequestEmitDebugInfo() = 0; 380 virtual void RequestEmitDebugInfo() = 0;
383 }; 381 };
384 382
385 } // namespace syncer 383 } // namespace syncer
386 384
387 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ 385 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698