| OLD | NEW |
| 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 CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ |
| 6 #define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ | 6 #define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 class SyncManagerFactory; | 35 class SyncManagerFactory; |
| 36 } | 36 } |
| 37 | 37 |
| 38 namespace sync_driver { | 38 namespace sync_driver { |
| 39 class ChangeProcessor; | 39 class ChangeProcessor; |
| 40 class SyncFrontend; | 40 class SyncFrontend; |
| 41 } | 41 } |
| 42 | 42 |
| 43 namespace browser_sync { | 43 namespace browser_sync { |
| 44 | 44 |
| 45 class SyncedDeviceTracker; | |
| 46 | |
| 47 // An API to "host" the top level SyncAPI element. | 45 // An API to "host" the top level SyncAPI element. |
| 48 // | 46 // |
| 49 // This class handles dispatch of potentially blocking calls to appropriate | 47 // This class handles dispatch of potentially blocking calls to appropriate |
| 50 // threads and ensures that the SyncFrontend is only accessed on the UI loop. | 48 // threads and ensures that the SyncFrontend is only accessed on the UI loop. |
| 51 class SyncBackendHost : public sync_driver::BackendDataTypeConfigurer { | 49 class SyncBackendHost : public sync_driver::BackendDataTypeConfigurer { |
| 52 public: | 50 public: |
| 53 typedef syncer::SyncStatus Status; | 51 typedef syncer::SyncStatus Status; |
| 54 | 52 |
| 55 // Stubs used by implementing classes. | 53 // Stubs used by implementing classes. |
| 56 SyncBackendHost(); | 54 SyncBackendHost(); |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 | 178 |
| 181 // True if the cryptographer has any keys available to attempt decryption. | 179 // True if the cryptographer has any keys available to attempt decryption. |
| 182 // Could mean we've downloaded and loaded Nigori objects, or we bootstrapped | 180 // Could mean we've downloaded and loaded Nigori objects, or we bootstrapped |
| 183 // using a token previously received. | 181 // using a token previously received. |
| 184 virtual bool IsCryptographerReady( | 182 virtual bool IsCryptographerReady( |
| 185 const syncer::BaseTransaction* trans) const = 0; | 183 const syncer::BaseTransaction* trans) const = 0; |
| 186 | 184 |
| 187 virtual void GetModelSafeRoutingInfo( | 185 virtual void GetModelSafeRoutingInfo( |
| 188 syncer::ModelSafeRoutingInfo* out) const = 0; | 186 syncer::ModelSafeRoutingInfo* out) const = 0; |
| 189 | 187 |
| 190 // Fetches the DeviceInfo tracker. | |
| 191 virtual SyncedDeviceTracker* GetSyncedDeviceTracker() const = 0; | |
| 192 | |
| 193 // Requests that the backend forward to the fronent any protocol events in | 188 // Requests that the backend forward to the fronent any protocol events in |
| 194 // its buffer and begin forwarding automatically from now on. Repeated calls | 189 // its buffer and begin forwarding automatically from now on. Repeated calls |
| 195 // to this function may result in the same events being emitted several | 190 // to this function may result in the same events being emitted several |
| 196 // times. | 191 // times. |
| 197 virtual void RequestBufferedProtocolEventsAndEnableForwarding() = 0; | 192 virtual void RequestBufferedProtocolEventsAndEnableForwarding() = 0; |
| 198 | 193 |
| 199 // Disables protocol event forwarding. | 194 // Disables protocol event forwarding. |
| 200 virtual void DisableProtocolEventForwarding() = 0; | 195 virtual void DisableProtocolEventForwarding() = 0; |
| 201 | 196 |
| 202 // Returns a ListValue representing all nodes for the specified types through | 197 // Returns a ListValue representing all nodes for the specified types through |
| (...skipping 12 matching lines...) Expand all Loading... |
| 215 virtual void DisableDirectoryTypeDebugInfoForwarding() = 0; | 210 virtual void DisableDirectoryTypeDebugInfoForwarding() = 0; |
| 216 | 211 |
| 217 virtual base::MessageLoop* GetSyncLoopForTesting() = 0; | 212 virtual base::MessageLoop* GetSyncLoopForTesting() = 0; |
| 218 | 213 |
| 219 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost); | 214 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost); |
| 220 }; | 215 }; |
| 221 | 216 |
| 222 } // namespace browser_sync | 217 } // namespace browser_sync |
| 223 | 218 |
| 224 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ | 219 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ |
| OLD | NEW |