OLD | NEW |
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_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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 public ServerConnectionEventListener, | 57 public ServerConnectionEventListener, |
58 public syncable::DirectoryChangeDelegate, | 58 public syncable::DirectoryChangeDelegate, |
59 public SyncEncryptionHandler::Observer { | 59 public SyncEncryptionHandler::Observer { |
60 public: | 60 public: |
61 // Create an uninitialized SyncManager. Callers must Init() before using. | 61 // Create an uninitialized SyncManager. Callers must Init() before using. |
62 explicit SyncManagerImpl(const std::string& name); | 62 explicit SyncManagerImpl(const std::string& name); |
63 virtual ~SyncManagerImpl(); | 63 virtual ~SyncManagerImpl(); |
64 | 64 |
65 // SyncManager implementation. | 65 // SyncManager implementation. |
66 virtual void Init( | 66 virtual void Init( |
67 const FilePath& database_location, | 67 const base::FilePath& database_location, |
68 const WeakHandle<JsEventHandler>& event_handler, | 68 const WeakHandle<JsEventHandler>& event_handler, |
69 const std::string& sync_server_and_path, | 69 const std::string& sync_server_and_path, |
70 int sync_server_port, | 70 int sync_server_port, |
71 bool use_ssl, | 71 bool use_ssl, |
72 scoped_ptr<HttpPostProviderFactory> post_factory, | 72 scoped_ptr<HttpPostProviderFactory> post_factory, |
73 const std::vector<ModelSafeWorker*>& workers, | 73 const std::vector<ModelSafeWorker*>& workers, |
74 ExtensionsActivityMonitor* extensions_activity_monitor, | 74 ExtensionsActivityMonitor* extensions_activity_monitor, |
75 SyncManager::ChangeDelegate* change_delegate, | 75 SyncManager::ChangeDelegate* change_delegate, |
76 const SyncCredentials& credentials, | 76 const SyncCredentials& credentials, |
77 scoped_ptr<Invalidator> invalidator, | 77 scoped_ptr<Invalidator> invalidator, |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 JsArgList GetNotificationInfo(const JsArgList& args); | 283 JsArgList GetNotificationInfo(const JsArgList& args); |
284 JsArgList GetRootNodeDetails(const JsArgList& args); | 284 JsArgList GetRootNodeDetails(const JsArgList& args); |
285 JsArgList GetAllNodes(const JsArgList& args); | 285 JsArgList GetAllNodes(const JsArgList& args); |
286 JsArgList GetNodeSummariesById(const JsArgList& args); | 286 JsArgList GetNodeSummariesById(const JsArgList& args); |
287 JsArgList GetNodeDetailsById(const JsArgList& args); | 287 JsArgList GetNodeDetailsById(const JsArgList& args); |
288 JsArgList GetChildNodeIds(const JsArgList& args); | 288 JsArgList GetChildNodeIds(const JsArgList& args); |
289 JsArgList GetClientServerTraffic(const JsArgList& args); | 289 JsArgList GetClientServerTraffic(const JsArgList& args); |
290 | 290 |
291 syncable::Directory* directory(); | 291 syncable::Directory* directory(); |
292 | 292 |
293 FilePath database_path_; | 293 base::FilePath database_path_; |
294 | 294 |
295 const std::string name_; | 295 const std::string name_; |
296 | 296 |
297 base::ThreadChecker thread_checker_; | 297 base::ThreadChecker thread_checker_; |
298 | 298 |
299 base::WeakPtrFactory<SyncManagerImpl> weak_ptr_factory_; | 299 base::WeakPtrFactory<SyncManagerImpl> weak_ptr_factory_; |
300 | 300 |
301 // Thread-safe handle used by | 301 // Thread-safe handle used by |
302 // HandleCalculateChangesChangeEventFromSyncApi(), which can be | 302 // HandleCalculateChangesChangeEventFromSyncApi(), which can be |
303 // called from any thread. Valid only between between calls to | 303 // called from any thread. Valid only between between calls to |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 // changing passphrases, and in general handles sync-specific interactions | 382 // changing passphrases, and in general handles sync-specific interactions |
383 // with the cryptographer. | 383 // with the cryptographer. |
384 scoped_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_; | 384 scoped_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_; |
385 | 385 |
386 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); | 386 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); |
387 }; | 387 }; |
388 | 388 |
389 } // namespace syncer | 389 } // namespace syncer |
390 | 390 |
391 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 391 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
OLD | NEW |