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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 base::ThreadChecker thread_checker_; | 312 base::ThreadChecker thread_checker_; |
314 | 313 |
315 base::WeakPtrFactory<SyncBackendHostImpl> weak_ptr_factory_; | 314 base::WeakPtrFactory<SyncBackendHostImpl> weak_ptr_factory_; |
316 | 315 |
317 DISALLOW_COPY_AND_ASSIGN(SyncBackendHostImpl); | 316 DISALLOW_COPY_AND_ASSIGN(SyncBackendHostImpl); |
318 }; | 317 }; |
319 | 318 |
320 } // namespace syncer | 319 } // namespace syncer |
321 | 320 |
322 #endif // COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_IMPL_H_ | 321 #endif // COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_IMPL_H_ |
OLD | NEW |