| 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_CORE_H_ | 5 #ifndef COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_CORE_H_ |
| 6 #define COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_CORE_H_ | 6 #define COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_CORE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 | 158 |
| 159 // Tell the sync manager to persist its state by writing to disk. | 159 // Tell the sync manager to persist its state by writing to disk. |
| 160 // Called on the sync thread, both by a timer and, on Android, when the | 160 // Called on the sync thread, both by a timer and, on Android, when the |
| 161 // application is backgrounded. | 161 // application is backgrounded. |
| 162 void SaveChanges(); | 162 void SaveChanges(); |
| 163 | 163 |
| 164 void DoClearServerData( | 164 void DoClearServerData( |
| 165 const SyncManager::ClearServerDataCallback& frontend_callback); | 165 const SyncManager::ClearServerDataCallback& frontend_callback); |
| 166 | 166 |
| 167 // Notify the syncer that the cookie jar has changed. | 167 // Notify the syncer that the cookie jar has changed. |
| 168 void DoOnCookieJarChanged(bool account_mismatch, bool empty_jar); | 168 void DoOnCookieJarChanged(bool account_mismatch, |
| 169 bool empty_jar, |
| 170 const base::Closure& callback); |
| 169 | 171 |
| 170 private: | 172 private: |
| 171 friend class base::RefCountedThreadSafe<SyncBackendHostCore>; | 173 friend class base::RefCountedThreadSafe<SyncBackendHostCore>; |
| 172 | 174 |
| 173 ~SyncBackendHostCore() override; | 175 ~SyncBackendHostCore() override; |
| 174 | 176 |
| 175 // Invoked when initialization of syncapi is complete and we can start | 177 // Invoked when initialization of syncapi is complete and we can start |
| 176 // our timer. | 178 // our timer. |
| 177 // This must be called from the thread on which SaveChanges is intended to | 179 // This must be called from the thread on which SaveChanges is intended to |
| 178 // be run on; the host's |registrar_->sync_thread()|. | 180 // be run on; the host's |registrar_->sync_thread()|. |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 base::ThreadChecker thread_checker_; | 234 base::ThreadChecker thread_checker_; |
| 233 | 235 |
| 234 base::WeakPtrFactory<SyncBackendHostCore> weak_ptr_factory_; | 236 base::WeakPtrFactory<SyncBackendHostCore> weak_ptr_factory_; |
| 235 | 237 |
| 236 DISALLOW_COPY_AND_ASSIGN(SyncBackendHostCore); | 238 DISALLOW_COPY_AND_ASSIGN(SyncBackendHostCore); |
| 237 }; | 239 }; |
| 238 | 240 |
| 239 } // namespace syncer | 241 } // namespace syncer |
| 240 | 242 |
| 241 #endif // COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_CORE_H_ | 243 #endif // COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_CORE_H_ |
| OLD | NEW |