| 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 "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 ScopedVector<base::ListValue>) > callback); | 248 ScopedVector<base::ListValue>) > callback); |
| 249 | 249 |
| 250 // Tell the sync manager to persist its state by writing to disk. | 250 // Tell the sync manager to persist its state by writing to disk. |
| 251 // Called on the sync thread, both by a timer and, on Android, when the | 251 // Called on the sync thread, both by a timer and, on Android, when the |
| 252 // application is backgrounded. | 252 // application is backgrounded. |
| 253 void SaveChanges(); | 253 void SaveChanges(); |
| 254 | 254 |
| 255 void DoClearServerData( | 255 void DoClearServerData( |
| 256 const syncer::SyncManager::ClearServerDataCallback& frontend_callback); | 256 const syncer::SyncManager::ClearServerDataCallback& frontend_callback); |
| 257 | 257 |
| 258 // Notify the syncer that the cookie jar has changed. |
| 259 void DoOnCookieJarChanged(bool account_mismatch); |
| 260 |
| 258 private: | 261 private: |
| 259 friend class base::RefCountedThreadSafe<SyncBackendHostCore>; | 262 friend class base::RefCountedThreadSafe<SyncBackendHostCore>; |
| 260 friend class SyncBackendHostForProfileSyncTest; | 263 friend class SyncBackendHostForProfileSyncTest; |
| 261 | 264 |
| 262 ~SyncBackendHostCore() override; | 265 ~SyncBackendHostCore() override; |
| 263 | 266 |
| 264 // Invoked when initialization of syncapi is complete and we can start | 267 // Invoked when initialization of syncapi is complete and we can start |
| 265 // our timer. | 268 // our timer. |
| 266 // This must be called from the thread on which SaveChanges is intended to | 269 // This must be called from the thread on which SaveChanges is intended to |
| 267 // be run on; the host's |registrar_->sync_thread()|. | 270 // be run on; the host's |registrar_->sync_thread()|. |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 std::map<syncer::ModelType, int64_t> last_invalidation_versions_; | 329 std::map<syncer::ModelType, int64_t> last_invalidation_versions_; |
| 327 | 330 |
| 328 base::WeakPtrFactory<SyncBackendHostCore> weak_ptr_factory_; | 331 base::WeakPtrFactory<SyncBackendHostCore> weak_ptr_factory_; |
| 329 | 332 |
| 330 DISALLOW_COPY_AND_ASSIGN(SyncBackendHostCore); | 333 DISALLOW_COPY_AND_ASSIGN(SyncBackendHostCore); |
| 331 }; | 334 }; |
| 332 | 335 |
| 333 } // namespace browser_sync | 336 } // namespace browser_sync |
| 334 | 337 |
| 335 #endif // COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_CORE_H_ | 338 #endif // COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_CORE_H_ |
| OLD | NEW |