OLD | NEW |
1 // Copyright (c) 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 |
11 #include "net/base/network_change_notifier.h" | 11 #include "net/base/network_change_notifier.h" |
| 12 #include "sync/base/sync_export.h" |
12 #include "sync/engine/all_status.h" | 13 #include "sync/engine/all_status.h" |
13 #include "sync/engine/net/server_connection_manager.h" | 14 #include "sync/engine/net/server_connection_manager.h" |
14 #include "sync/engine/sync_engine_event.h" | 15 #include "sync/engine/sync_engine_event.h" |
15 #include "sync/engine/throttled_data_type_tracker.h" | 16 #include "sync/engine/throttled_data_type_tracker.h" |
16 #include "sync/engine/traffic_recorder.h" | 17 #include "sync/engine/traffic_recorder.h" |
17 #include "sync/internal_api/change_reorder_buffer.h" | 18 #include "sync/internal_api/change_reorder_buffer.h" |
18 #include "sync/internal_api/debug_info_event_listener.h" | 19 #include "sync/internal_api/debug_info_event_listener.h" |
19 #include "sync/internal_api/js_mutation_event_observer.h" | 20 #include "sync/internal_api/js_mutation_event_observer.h" |
20 #include "sync/internal_api/js_sync_encryption_handler_observer.h" | 21 #include "sync/internal_api/js_sync_encryption_handler_observer.h" |
21 #include "sync/internal_api/js_sync_manager_observer.h" | 22 #include "sync/internal_api/js_sync_manager_observer.h" |
(...skipping 17 matching lines...) Expand all Loading... |
39 } | 40 } |
40 | 41 |
41 // SyncManager encapsulates syncable::Directory and serves as the parent of all | 42 // SyncManager encapsulates syncable::Directory and serves as the parent of all |
42 // other objects in the sync API. If multiple threads interact with the same | 43 // other objects in the sync API. If multiple threads interact with the same |
43 // local sync repository (i.e. the same sqlite database), they should share a | 44 // local sync repository (i.e. the same sqlite database), they should share a |
44 // single SyncManager instance. The caller should typically create one | 45 // single SyncManager instance. The caller should typically create one |
45 // SyncManager for the lifetime of a user session. | 46 // SyncManager for the lifetime of a user session. |
46 // | 47 // |
47 // Unless stated otherwise, all methods of SyncManager should be called on the | 48 // Unless stated otherwise, all methods of SyncManager should be called on the |
48 // same thread. | 49 // same thread. |
49 class SyncManagerImpl : | 50 class SYNC_EXPORT_PRIVATE SyncManagerImpl : |
50 public SyncManager, | 51 public SyncManager, |
51 public net::NetworkChangeNotifier::IPAddressObserver, | 52 public net::NetworkChangeNotifier::IPAddressObserver, |
52 public net::NetworkChangeNotifier::ConnectionTypeObserver, | 53 public net::NetworkChangeNotifier::ConnectionTypeObserver, |
53 public InvalidationHandler, | 54 public InvalidationHandler, |
54 public JsBackend, | 55 public JsBackend, |
55 public SyncEngineEventListener, | 56 public SyncEngineEventListener, |
56 public ServerConnectionEventListener, | 57 public ServerConnectionEventListener, |
57 public syncable::DirectoryChangeDelegate, | 58 public syncable::DirectoryChangeDelegate, |
58 public SyncEncryptionHandler::Observer { | 59 public SyncEncryptionHandler::Observer { |
59 public: | 60 public: |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 // changing passphrases, and in general handles sync-specific interactions | 378 // changing passphrases, and in general handles sync-specific interactions |
378 // with the cryptographer. | 379 // with the cryptographer. |
379 scoped_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_; | 380 scoped_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_; |
380 | 381 |
381 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); | 382 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); |
382 }; | 383 }; |
383 | 384 |
384 } // namespace syncer | 385 } // namespace syncer |
385 | 386 |
386 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 387 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
OLD | NEW |