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 11 matching lines...) Expand all Loading... |
22 #include "sync/internal_api/public/util/unrecoverable_error_handler.h" | 22 #include "sync/internal_api/public/util/unrecoverable_error_handler.h" |
23 #include "sync/internal_api/public/util/weak_handle.h" | 23 #include "sync/internal_api/public/util/weak_handle.h" |
24 | 24 |
25 class GURL; | 25 class GURL; |
26 | 26 |
27 namespace base { | 27 namespace base { |
28 class MessageLoop; | 28 class MessageLoop; |
29 } | 29 } |
30 | 30 |
31 namespace syncer { | 31 namespace syncer { |
| 32 class HttpPostProviderFactory; |
32 class SyncManagerFactory; | 33 class SyncManagerFactory; |
33 } | 34 } |
34 | 35 |
35 namespace browser_sync { | 36 namespace browser_sync { |
36 | 37 |
37 class ChangeProcessor; | 38 class ChangeProcessor; |
38 class SyncFrontend; | 39 class SyncFrontend; |
39 class SyncedDeviceTracker; | 40 class SyncedDeviceTracker; |
40 | 41 |
41 // An API to "host" the top level SyncAPI element. | 42 // An API to "host" the top level SyncAPI element. |
(...skipping 17 matching lines...) Expand all Loading... |
59 virtual void Initialize( | 60 virtual void Initialize( |
60 SyncFrontend* frontend, | 61 SyncFrontend* frontend, |
61 scoped_ptr<base::Thread> sync_thread, | 62 scoped_ptr<base::Thread> sync_thread, |
62 const syncer::WeakHandle<syncer::JsEventHandler>& event_handler, | 63 const syncer::WeakHandle<syncer::JsEventHandler>& event_handler, |
63 const GURL& service_url, | 64 const GURL& service_url, |
64 const syncer::SyncCredentials& credentials, | 65 const syncer::SyncCredentials& credentials, |
65 bool delete_sync_data_folder, | 66 bool delete_sync_data_folder, |
66 scoped_ptr<syncer::SyncManagerFactory> sync_manager_factory, | 67 scoped_ptr<syncer::SyncManagerFactory> sync_manager_factory, |
67 scoped_ptr<syncer::UnrecoverableErrorHandler> unrecoverable_error_handler, | 68 scoped_ptr<syncer::UnrecoverableErrorHandler> unrecoverable_error_handler, |
68 syncer::ReportUnrecoverableErrorFunction | 69 syncer::ReportUnrecoverableErrorFunction |
69 report_unrecoverable_error_function) = 0; | 70 report_unrecoverable_error_function, |
| 71 scoped_ptr<syncer::HttpPostProviderFactory> |
| 72 http_post_provider_factory) = 0; |
70 | 73 |
71 // Called on the frontend's thread to update SyncCredentials. | 74 // Called on the frontend's thread to update SyncCredentials. |
72 virtual void UpdateCredentials( | 75 virtual void UpdateCredentials( |
73 const syncer::SyncCredentials& credentials) = 0; | 76 const syncer::SyncCredentials& credentials) = 0; |
74 | 77 |
75 // This starts the SyncerThread running a Syncer object to communicate with | 78 // This starts the SyncerThread running a Syncer object to communicate with |
76 // sync servers. Until this is called, no changes will leave or enter this | 79 // sync servers. Until this is called, no changes will leave or enter this |
77 // browser from the cloud / sync servers. | 80 // browser from the cloud / sync servers. |
78 // Called on |frontend_loop_|. | 81 // Called on |frontend_loop_|. |
79 virtual void StartSyncingWithServer() = 0; | 82 virtual void StartSyncingWithServer() = 0; |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 virtual SyncedDeviceTracker* GetSyncedDeviceTracker() const = 0; | 194 virtual SyncedDeviceTracker* GetSyncedDeviceTracker() const = 0; |
192 | 195 |
193 virtual base::MessageLoop* GetSyncLoopForTesting() = 0; | 196 virtual base::MessageLoop* GetSyncLoopForTesting() = 0; |
194 | 197 |
195 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost); | 198 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost); |
196 }; | 199 }; |
197 | 200 |
198 } // namespace browser_sync | 201 } // namespace browser_sync |
199 | 202 |
200 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ | 203 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ |
OLD | NEW |