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 COMPONENTS_SYNC_ENGINE_SYNC_ENGINE_H_ | 5 #ifndef COMPONENTS_SYNC_ENGINE_SYNC_ENGINE_H_ |
6 #define COMPONENTS_SYNC_ENGINE_SYNC_ENGINE_H_ | 6 #define COMPONENTS_SYNC_ENGINE_SYNC_ENGINE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 24 matching lines...) Expand all Loading... |
35 class SyncEngineHost; | 35 class SyncEngineHost; |
36 class SyncManagerFactory; | 36 class SyncManagerFactory; |
37 class UnrecoverableErrorHandler; | 37 class UnrecoverableErrorHandler; |
38 | 38 |
39 // The interface into the sync engine, which is the part of sync that performs | 39 // The interface into the sync engine, which is the part of sync that performs |
40 // communication between model types and the sync server. In prod the engine | 40 // communication between model types and the sync server. In prod the engine |
41 // will always live on the sync thread and the object implementing this | 41 // will always live on the sync thread and the object implementing this |
42 // interface will handle crossing threads if necessary. | 42 // interface will handle crossing threads if necessary. |
43 class SyncEngine : public ModelTypeConfigurer { | 43 class SyncEngine : public ModelTypeConfigurer { |
44 public: | 44 public: |
45 typedef SyncStatus Status; | 45 using Status = SyncStatus; |
46 typedef base::Callback<std::unique_ptr<HttpPostProviderFactory>( | 46 using HttpPostProviderFactoryGetter = |
47 CancelationSignal*)> | 47 base::Callback<std::unique_ptr<HttpPostProviderFactory>( |
48 HttpPostProviderFactoryGetter; | 48 CancelationSignal*)>; |
49 | 49 |
50 // Utility struct for holding initialization options. | 50 // Utility struct for holding initialization options. |
51 struct InitParams { | 51 struct InitParams { |
52 InitParams(); | 52 InitParams(); |
53 InitParams(InitParams&& other); | 53 InitParams(InitParams&& other); |
54 ~InitParams(); | 54 ~InitParams(); |
55 | 55 |
56 scoped_refptr<base::SingleThreadTaskRunner> sync_task_runner; | 56 scoped_refptr<base::SingleThreadTaskRunner> sync_task_runner; |
57 SyncEngineHost* host = nullptr; | 57 SyncEngineHost* host = nullptr; |
58 std::unique_ptr<SyncBackendRegistrar> registrar; | 58 std::unique_ptr<SyncBackendRegistrar> registrar; |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 // See SyncManager::OnCookieJarChanged. | 188 // See SyncManager::OnCookieJarChanged. |
189 virtual void OnCookieJarChanged(bool account_mismatch, bool empty_jar) = 0; | 189 virtual void OnCookieJarChanged(bool account_mismatch, bool empty_jar) = 0; |
190 | 190 |
191 private: | 191 private: |
192 DISALLOW_COPY_AND_ASSIGN(SyncEngine); | 192 DISALLOW_COPY_AND_ASSIGN(SyncEngine); |
193 }; | 193 }; |
194 | 194 |
195 } // namespace syncer | 195 } // namespace syncer |
196 | 196 |
197 #endif // COMPONENTS_SYNC_ENGINE_SYNC_ENGINE_H_ | 197 #endif // COMPONENTS_SYNC_ENGINE_SYNC_ENGINE_H_ |
OLD | NEW |