| 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" |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/threading/thread.h" | 14 #include "base/threading/thread.h" |
| 15 #include "components/sync_driver/backend_data_type_configurer.h" | 15 #include "components/sync_driver/backend_data_type_configurer.h" |
| 16 #include "sync/internal_api/public/base/model_type.h" | 16 #include "sync/internal_api/public/base/model_type.h" |
| 17 #include "sync/internal_api/public/configure_reason.h" | 17 #include "sync/internal_api/public/configure_reason.h" |
| 18 #include "sync/internal_api/public/sessions/sync_session_snapshot.h" | 18 #include "sync/internal_api/public/sessions/sync_session_snapshot.h" |
| 19 #include "sync/internal_api/public/sync_core_proxy.h" | 19 #include "sync/internal_api/public/sync_context_proxy.h" |
| 20 #include "sync/internal_api/public/sync_manager.h" | 20 #include "sync/internal_api/public/sync_manager.h" |
| 21 #include "sync/internal_api/public/sync_manager_factory.h" | 21 #include "sync/internal_api/public/sync_manager_factory.h" |
| 22 #include "sync/internal_api/public/util/report_unrecoverable_error_function.h" | 22 #include "sync/internal_api/public/util/report_unrecoverable_error_function.h" |
| 23 #include "sync/internal_api/public/util/unrecoverable_error_handler.h" | 23 #include "sync/internal_api/public/util/unrecoverable_error_handler.h" |
| 24 #include "sync/internal_api/public/util/weak_handle.h" | 24 #include "sync/internal_api/public/util/weak_handle.h" |
| 25 | 25 |
| 26 class GURL; | 26 class GURL; |
| 27 | 27 |
| 28 namespace base { | 28 namespace base { |
| 29 class MessageLoop; | 29 class MessageLoop; |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 const base::Callback<void()>& retry_callback) OVERRIDE = 0; | 141 const base::Callback<void()>& retry_callback) OVERRIDE = 0; |
| 142 | 142 |
| 143 // Turns on encryption of all present and future sync data. | 143 // Turns on encryption of all present and future sync data. |
| 144 virtual void EnableEncryptEverything() = 0; | 144 virtual void EnableEncryptEverything() = 0; |
| 145 | 145 |
| 146 // Called on |frontend_loop_| to obtain a handle to the UserShare needed for | 146 // Called on |frontend_loop_| to obtain a handle to the UserShare needed for |
| 147 // creating transactions. Should not be called before we signal | 147 // creating transactions. Should not be called before we signal |
| 148 // initialization is complete with OnBackendInitialized(). | 148 // initialization is complete with OnBackendInitialized(). |
| 149 virtual syncer::UserShare* GetUserShare() const = 0; | 149 virtual syncer::UserShare* GetUserShare() const = 0; |
| 150 | 150 |
| 151 // Called on |frontend_loop_| to obtain a handle to the SyncCore needed by | 151 // Called on |frontend_loop_| to obtain a handle to the SyncContext needed by |
| 152 // the non-blocking sync types to communicate with the server. | 152 // the non-blocking sync types to communicate with the server. |
| 153 // | 153 // |
| 154 // Should be called only when the backend is initialized. | 154 // Should be called only when the backend is initialized. |
| 155 virtual scoped_ptr<syncer::SyncCoreProxy> GetSyncCoreProxy() = 0; | 155 virtual scoped_ptr<syncer::SyncContextProxy> GetSyncContextProxy() = 0; |
| 156 | 156 |
| 157 // Called from any thread to obtain current status information in detailed or | 157 // Called from any thread to obtain current status information in detailed or |
| 158 // summarized form. | 158 // summarized form. |
| 159 virtual Status GetDetailedStatus() = 0; | 159 virtual Status GetDetailedStatus() = 0; |
| 160 virtual syncer::sessions::SyncSessionSnapshot | 160 virtual syncer::sessions::SyncSessionSnapshot |
| 161 GetLastSessionSnapshot() const = 0; | 161 GetLastSessionSnapshot() const = 0; |
| 162 | 162 |
| 163 // Determines if the underlying sync engine has made any local changes to | 163 // Determines if the underlying sync engine has made any local changes to |
| 164 // items that have not yet been synced with the server. | 164 // items that have not yet been synced with the server. |
| 165 // ONLY CALL THIS IF OnInitializationComplete was called! | 165 // ONLY CALL THIS IF OnInitializationComplete was called! |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 virtual void DisableDirectoryTypeDebugInfoForwarding() = 0; | 213 virtual void DisableDirectoryTypeDebugInfoForwarding() = 0; |
| 214 | 214 |
| 215 virtual base::MessageLoop* GetSyncLoopForTesting() = 0; | 215 virtual base::MessageLoop* GetSyncLoopForTesting() = 0; |
| 216 | 216 |
| 217 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost); | 217 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost); |
| 218 }; | 218 }; |
| 219 | 219 |
| 220 } // namespace browser_sync | 220 } // namespace browser_sync |
| 221 | 221 |
| 222 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ | 222 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ |
| OLD | NEW |