OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_IMPL_H_ | 5 #ifndef COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_IMPL_H_ |
6 #define COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_IMPL_H_ | 6 #define COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_IMPL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 class SyncBackendRegistrar; | 42 class SyncBackendRegistrar; |
43 class SyncClient; | 43 class SyncClient; |
44 class SyncPrefs; | 44 class SyncPrefs; |
45 | 45 |
46 // The only real implementation of the SyncEngine. See that interface's | 46 // The only real implementation of the SyncEngine. See that interface's |
47 // definition for documentation of public methods. | 47 // definition for documentation of public methods. |
48 class SyncBackendHostImpl : public SyncEngine, public InvalidationHandler { | 48 class SyncBackendHostImpl : public SyncEngine, public InvalidationHandler { |
49 public: | 49 public: |
50 typedef SyncStatus Status; | 50 typedef SyncStatus Status; |
51 | 51 |
52 SyncBackendHostImpl( | 52 SyncBackendHostImpl(const std::string& name, |
53 const std::string& name, | 53 SyncClient* sync_client, |
54 SyncClient* sync_client, | 54 invalidation::InvalidationService* invalidator, |
55 invalidation::InvalidationService* invalidator, | 55 const base::WeakPtr<SyncPrefs>& sync_prefs, |
56 const base::WeakPtr<SyncPrefs>& sync_prefs, | 56 const base::FilePath& sync_data_folder); |
57 const base::FilePath& sync_folder); | |
58 ~SyncBackendHostImpl() override; | 57 ~SyncBackendHostImpl() override; |
59 | 58 |
60 // SyncEngine implementation. | 59 // SyncEngine implementation. |
61 void Initialize(InitParams params) override; | 60 void Initialize(InitParams params) override; |
62 void TriggerRefresh(const ModelTypeSet& types) override; | 61 void TriggerRefresh(const ModelTypeSet& types) override; |
63 void UpdateCredentials(const SyncCredentials& credentials) override; | 62 void UpdateCredentials(const SyncCredentials& credentials) override; |
64 void StartSyncingWithServer() override; | 63 void StartSyncingWithServer() override; |
65 void SetEncryptionPassphrase(const std::string& passphrase, | 64 void SetEncryptionPassphrase(const std::string& passphrase, |
66 bool is_explicit) override; | 65 bool is_explicit) override; |
67 bool SetDecryptionPassphrase(const std::string& passphrase) override | 66 bool SetDecryptionPassphrase(const std::string& passphrase) override |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 base::ThreadChecker thread_checker_; | 313 base::ThreadChecker thread_checker_; |
315 | 314 |
316 base::WeakPtrFactory<SyncBackendHostImpl> weak_ptr_factory_; | 315 base::WeakPtrFactory<SyncBackendHostImpl> weak_ptr_factory_; |
317 | 316 |
318 DISALLOW_COPY_AND_ASSIGN(SyncBackendHostImpl); | 317 DISALLOW_COPY_AND_ASSIGN(SyncBackendHostImpl); |
319 }; | 318 }; |
320 | 319 |
321 } // namespace syncer | 320 } // namespace syncer |
322 | 321 |
323 #endif // COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_IMPL_H_ | 322 #endif // COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_IMPL_H_ |
OLD | NEW |