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

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

Issue 10911073: NOT FOR COMMIT: Add DeviceInfo type and ChangeProcessor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix several issues Created 8 years, 3 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
« no previous file with comments | « sync/internal_api/public/write_node.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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 explicit SyncManagerImpl(const std::string& name); 59 explicit SyncManagerImpl(const std::string& name);
60 virtual ~SyncManagerImpl(); 60 virtual ~SyncManagerImpl();
61 61
62 // SyncManager implementation. 62 // SyncManager implementation.
63 virtual void Init( 63 virtual void Init(
64 const FilePath& database_location, 64 const FilePath& database_location,
65 const WeakHandle<JsEventHandler>& event_handler, 65 const WeakHandle<JsEventHandler>& event_handler,
66 const std::string& sync_server_and_path, 66 const std::string& sync_server_and_path,
67 int sync_server_port, 67 int sync_server_port,
68 bool use_ssl, 68 bool use_ssl,
69 const scoped_refptr<base::TaskRunner>& blocking_task_runner,
70 scoped_ptr<HttpPostProviderFactory> post_factory, 69 scoped_ptr<HttpPostProviderFactory> post_factory,
71 const std::vector<ModelSafeWorker*>& workers, 70 const std::vector<ModelSafeWorker*>& workers,
72 ExtensionsActivityMonitor* extensions_activity_monitor, 71 ExtensionsActivityMonitor* extensions_activity_monitor,
73 SyncManager::ChangeDelegate* change_delegate, 72 SyncManager::ChangeDelegate* change_delegate,
74 const SyncCredentials& credentials, 73 const SyncCredentials& credentials,
75 scoped_ptr<Invalidator> invalidator, 74 scoped_ptr<Invalidator> invalidator,
76 const std::string& restored_key_for_bootstrapping, 75 const std::string& restored_key_for_bootstrapping,
77 const std::string& restored_keystore_key_for_bootstrapping, 76 const std::string& restored_keystore_key_for_bootstrapping,
78 scoped_ptr<InternalComponentsFactory> internal_components_factory, 77 scoped_ptr<InternalComponentsFactory> internal_components_factory,
79 Encryptor* encryptor, 78 Encryptor* encryptor,
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 // ExtraPasswordChangeRecordData field of |buffer|. Otherwise sets 236 // ExtraPasswordChangeRecordData field of |buffer|. Otherwise sets
238 // |buffer|'s specifics field to contain the unencrypted data. 237 // |buffer|'s specifics field to contain the unencrypted data.
239 void SetExtraChangeRecordData(int64 id, 238 void SetExtraChangeRecordData(int64 id,
240 ModelType type, 239 ModelType type,
241 ChangeReorderBuffer* buffer, 240 ChangeReorderBuffer* buffer,
242 Cryptographer* cryptographer, 241 Cryptographer* cryptographer,
243 const syncable::EntryKernel& original, 242 const syncable::EntryKernel& original,
244 bool existed_before, 243 bool existed_before,
245 bool exists_now); 244 bool exists_now);
246 245
247 // Internal callback used by GetSessionName.
248 // TODO(rlarocque): not currently called from anywhere. This should be
249 // hooked up to something once we start preserving device information again.
250 void UpdateSessionNameCallback(const std::string& chrome_version,
251 const std::string& session_name);
252
253 // Called for every notification. This updates the notification statistics 246 // Called for every notification. This updates the notification statistics
254 // to be displayed in about:sync. 247 // to be displayed in about:sync.
255 void UpdateNotificationInfo( 248 void UpdateNotificationInfo(const ModelTypeStateMap& type_state_map);
256 const ModelTypeStateMap& type_state_map);
257 249
258 // Checks for server reachabilty and requests a nudge. 250 // Checks for server reachabilty and requests a nudge.
259 void OnIPAddressChangedImpl(); 251 void OnIPAddressChangedImpl();
260 252
261 // Helper function used only by the constructor. 253 // Helper function used only by the constructor.
262 void BindJsMessageHandler( 254 void BindJsMessageHandler(
263 const std::string& name, UnboundJsMessageHandler unbound_message_handler); 255 const std::string& name, UnboundJsMessageHandler unbound_message_handler);
264 256
265 // Returned pointer is owned by the caller. 257 // Returned pointer is owned by the caller.
266 static DictionaryValue* NotificationInfoToValue( 258 static DictionaryValue* NotificationInfoToValue(
(...skipping 26 matching lines...) Expand all
293 // HandleCalculateChangesChangeEventFromSyncApi(), which can be 285 // HandleCalculateChangesChangeEventFromSyncApi(), which can be
294 // called from any thread. Valid only between between calls to 286 // called from any thread. Valid only between between calls to
295 // Init() and Shutdown(). 287 // Init() and Shutdown().
296 // 288 //
297 // TODO(akalin): Ideally, we wouldn't need to store this; instead, 289 // TODO(akalin): Ideally, we wouldn't need to store this; instead,
298 // we'd have another worker class which implements 290 // we'd have another worker class which implements
299 // HandleCalculateChangesChangeEventFromSyncApi() and we'd pass it a 291 // HandleCalculateChangesChangeEventFromSyncApi() and we'd pass it a
300 // WeakHandle when we construct it. 292 // WeakHandle when we construct it.
301 WeakHandle<SyncManagerImpl> weak_handle_this_; 293 WeakHandle<SyncManagerImpl> weak_handle_this_;
302 294
303 // |blocking_task_runner| is a TaskRunner to be used for tasks that
304 // may block on disk I/O.
305 scoped_refptr<base::TaskRunner> blocking_task_runner_;
306
307 // We give a handle to share_ to clients of the API for use when constructing 295 // We give a handle to share_ to clients of the API for use when constructing
308 // any transaction type. 296 // any transaction type.
309 UserShare share_; 297 UserShare share_;
310 298
311 // This can be called from any thread, but only between calls to 299 // This can be called from any thread, but only between calls to
312 // OpenDirectory() and ShutdownOnSyncThread(). 300 // OpenDirectory() and ShutdownOnSyncThread().
313 WeakHandle<SyncManager::ChangeObserver> change_observer_; 301 WeakHandle<SyncManager::ChangeObserver> change_observer_;
314 302
315 ObserverList<SyncManager::Observer> observers_; 303 ObserverList<SyncManager::Observer> observers_;
316 304
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 // changing passphrases, and in general handles sync-specific interactions 364 // changing passphrases, and in general handles sync-specific interactions
377 // with the cryptographer. 365 // with the cryptographer.
378 scoped_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_; 366 scoped_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_;
379 367
380 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); 368 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl);
381 }; 369 };
382 370
383 } // namespace syncer 371 } // namespace syncer
384 372
385 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ 373 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_
OLDNEW
« no previous file with comments | « sync/internal_api/public/write_node.h ('k') | sync/internal_api/sync_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698