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

Side by Side Diff: sync/internal_api/sync_manager_impl.h

Issue 11360259: Sync: Add DeviceInfo's ChangeProcessor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix sync_client.cc Created 8 years, 1 month 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
« no previous file with comments | « sync/internal_api/public/test/test_user_share.h ('k') | sync/internal_api/sync_manager_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 SYNC_INTERNAL_API_SYNC_MANAGER_H_ 5 #ifndef SYNC_INTERNAL_API_SYNC_MANAGER_H_
6 #define SYNC_INTERNAL_API_SYNC_MANAGER_H_ 6 #define SYNC_INTERNAL_API_SYNC_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 explicit SyncManagerImpl(const std::string& name); 61 explicit SyncManagerImpl(const std::string& name);
62 virtual ~SyncManagerImpl(); 62 virtual ~SyncManagerImpl();
63 63
64 // SyncManager implementation. 64 // SyncManager implementation.
65 virtual void Init( 65 virtual void Init(
66 const FilePath& database_location, 66 const FilePath& database_location,
67 const WeakHandle<JsEventHandler>& event_handler, 67 const WeakHandle<JsEventHandler>& event_handler,
68 const std::string& sync_server_and_path, 68 const std::string& sync_server_and_path,
69 int sync_server_port, 69 int sync_server_port,
70 bool use_ssl, 70 bool use_ssl,
71 const scoped_refptr<base::TaskRunner>& blocking_task_runner,
72 scoped_ptr<HttpPostProviderFactory> post_factory, 71 scoped_ptr<HttpPostProviderFactory> post_factory,
73 const std::vector<ModelSafeWorker*>& workers, 72 const std::vector<ModelSafeWorker*>& workers,
74 ExtensionsActivityMonitor* extensions_activity_monitor, 73 ExtensionsActivityMonitor* extensions_activity_monitor,
75 SyncManager::ChangeDelegate* change_delegate, 74 SyncManager::ChangeDelegate* change_delegate,
76 const SyncCredentials& credentials, 75 const SyncCredentials& credentials,
77 scoped_ptr<Invalidator> invalidator, 76 scoped_ptr<Invalidator> invalidator,
78 const std::string& restored_key_for_bootstrapping, 77 const std::string& restored_key_for_bootstrapping,
79 const std::string& restored_keystore_key_for_bootstrapping, 78 const std::string& restored_keystore_key_for_bootstrapping,
80 scoped_ptr<InternalComponentsFactory> internal_components_factory, 79 scoped_ptr<InternalComponentsFactory> internal_components_factory,
81 Encryptor* encryptor, 80 Encryptor* encryptor,
(...skipping 22 matching lines...) Expand all
104 const ModelSafeRoutingInfo& new_routing_info, 103 const ModelSafeRoutingInfo& new_routing_info,
105 const base::Closure& ready_task, 104 const base::Closure& ready_task,
106 const base::Closure& retry_task) OVERRIDE; 105 const base::Closure& retry_task) OVERRIDE;
107 virtual void AddObserver(SyncManager::Observer* observer) OVERRIDE; 106 virtual void AddObserver(SyncManager::Observer* observer) OVERRIDE;
108 virtual void RemoveObserver(SyncManager::Observer* observer) OVERRIDE; 107 virtual void RemoveObserver(SyncManager::Observer* observer) OVERRIDE;
109 virtual SyncStatus GetDetailedStatus() const OVERRIDE; 108 virtual SyncStatus GetDetailedStatus() const OVERRIDE;
110 virtual void SaveChanges() OVERRIDE; 109 virtual void SaveChanges() OVERRIDE;
111 virtual void StopSyncingForShutdown(const base::Closure& callback) OVERRIDE; 110 virtual void StopSyncingForShutdown(const base::Closure& callback) OVERRIDE;
112 virtual void ShutdownOnSyncThread() OVERRIDE; 111 virtual void ShutdownOnSyncThread() OVERRIDE;
113 virtual UserShare* GetUserShare() OVERRIDE; 112 virtual UserShare* GetUserShare() OVERRIDE;
113 virtual const std::string cache_guid() OVERRIDE;
114 virtual bool ReceivedExperiment(Experiments* experiments) OVERRIDE; 114 virtual bool ReceivedExperiment(Experiments* experiments) OVERRIDE;
115 virtual bool HasUnsyncedItems() OVERRIDE; 115 virtual bool HasUnsyncedItems() OVERRIDE;
116 virtual SyncEncryptionHandler* GetEncryptionHandler() OVERRIDE; 116 virtual SyncEncryptionHandler* GetEncryptionHandler() OVERRIDE;
117 117
118 // SyncEncryptionHandler::Observer implementation. 118 // SyncEncryptionHandler::Observer implementation.
119 virtual void OnPassphraseRequired( 119 virtual void OnPassphraseRequired(
120 PassphraseRequiredReason reason, 120 PassphraseRequiredReason reason,
121 const sync_pb::EncryptedData& pending_keys) OVERRIDE; 121 const sync_pb::EncryptedData& pending_keys) OVERRIDE;
122 virtual void OnPassphraseAccepted() OVERRIDE; 122 virtual void OnPassphraseAccepted() OVERRIDE;
123 virtual void OnBootstrapTokenUpdated( 123 virtual void OnBootstrapTokenUpdated(
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 // HandleCalculateChangesChangeEventFromSyncApi(), which can be 295 // HandleCalculateChangesChangeEventFromSyncApi(), which can be
296 // called from any thread. Valid only between between calls to 296 // called from any thread. Valid only between between calls to
297 // Init() and Shutdown(). 297 // Init() and Shutdown().
298 // 298 //
299 // TODO(akalin): Ideally, we wouldn't need to store this; instead, 299 // TODO(akalin): Ideally, we wouldn't need to store this; instead,
300 // we'd have another worker class which implements 300 // we'd have another worker class which implements
301 // HandleCalculateChangesChangeEventFromSyncApi() and we'd pass it a 301 // HandleCalculateChangesChangeEventFromSyncApi() and we'd pass it a
302 // WeakHandle when we construct it. 302 // WeakHandle when we construct it.
303 WeakHandle<SyncManagerImpl> weak_handle_this_; 303 WeakHandle<SyncManagerImpl> weak_handle_this_;
304 304
305 // |blocking_task_runner| is a TaskRunner to be used for tasks that
306 // may block on disk I/O.
307 scoped_refptr<base::TaskRunner> blocking_task_runner_;
308
309 // We give a handle to share_ to clients of the API for use when constructing 305 // We give a handle to share_ to clients of the API for use when constructing
310 // any transaction type. 306 // any transaction type.
311 UserShare share_; 307 UserShare share_;
312 308
313 // This can be called from any thread, but only between calls to 309 // This can be called from any thread, but only between calls to
314 // OpenDirectory() and ShutdownOnSyncThread(). 310 // OpenDirectory() and ShutdownOnSyncThread().
315 WeakHandle<SyncManager::ChangeObserver> change_observer_; 311 WeakHandle<SyncManager::ChangeObserver> change_observer_;
316 312
317 ObserverList<SyncManager::Observer> observers_; 313 ObserverList<SyncManager::Observer> observers_;
318 314
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 // changing passphrases, and in general handles sync-specific interactions 375 // changing passphrases, and in general handles sync-specific interactions
380 // with the cryptographer. 376 // with the cryptographer.
381 scoped_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_; 377 scoped_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_;
382 378
383 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); 379 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl);
384 }; 380 };
385 381
386 } // namespace syncer 382 } // namespace syncer
387 383
388 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ 384 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_
OLDNEW
« no previous file with comments | « sync/internal_api/public/test/test_user_share.h ('k') | sync/internal_api/sync_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698