Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2567)

Unified Diff: chrome/browser/sync/glue/sync_backend_host.h

Issue 7190001: [Sync] Split DirectoryChangeListener for thread-safety (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix copyright Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/glue/sync_backend_host.h
diff --git a/chrome/browser/sync/glue/sync_backend_host.h b/chrome/browser/sync/glue/sync_backend_host.h
index d9c0ae5c3c5c74575d9868d1c28f7257c22f7d6e..7c53fea6b3d368d3b28a3421abd709a75fc4556a 100644
--- a/chrome/browser/sync/glue/sync_backend_host.h
+++ b/chrome/browser/sync/glue/sync_backend_host.h
@@ -398,7 +398,7 @@ class SyncBackendHost : public browser_sync::ModelSafeWorkerRegistrar {
// This method will add a reference to the context to persist it
// on the IO thread. Must be removed from IO thread.
- sync_api::SyncManager* syncapi() { return syncapi_.get(); }
+ sync_api::SyncManager* sync_manager() { return sync_manager_.get(); }
// Delete the sync data folder to cleanup backend data. Happens the first
// time sync is enabled for a user (to prevent accidentally reusing old
@@ -489,7 +489,7 @@ class SyncBackendHost : public browser_sync::ModelSafeWorkerRegistrar {
// Called from Core::OnInitializationComplete to handle updating
// frontend thread components.
- void HandleInitalizationCompletedOnFrontendLoop();
+ void HandleInitializationCompletedOnFrontendLoop();
void RouteJsEventOnFrontendLoop(
const std::string& name, const JsEventDetails& details);
@@ -503,14 +503,17 @@ class SyncBackendHost : public browser_sync::ModelSafeWorkerRegistrar {
// Return true if a model lives on the current thread.
bool IsCurrentThreadSafeForModel(syncable::ModelType model_type);
+ // Debug name of the Profile this object is for.
+ const std::string name_;
+
// Our parent SyncBackendHost
SyncBackendHost* host_;
// The timer used to periodically call SaveChanges.
base::RepeatingTimer<Core> save_changes_timer_;
- // The top-level syncapi entry point.
- scoped_ptr<sync_api::SyncManager> syncapi_;
+ // The top-level syncapi entry point. Lives on the sync thread.
+ scoped_ptr<sync_api::SyncManager> sync_manager_;
scoped_ptr<sync_notifier::SyncNotifier> sync_notifier_;
@@ -553,8 +556,6 @@ class SyncBackendHost : public browser_sync::ModelSafeWorkerRegistrar {
MessageLoop* sync_loop() { return sync_thread_.message_loop(); }
- void set_syncapi_initialized() { syncapi_initialized_ = true; }
-
// Helpers to persist a token that can be used to bootstrap sync encryption
// across browser restart to avoid requiring the user to re-enter their
// passphrase. |token| must be valid UTF-8 as we use the PrefService for
@@ -654,7 +655,7 @@ class SyncBackendHost : public browser_sync::ModelSafeWorkerRegistrar {
scoped_ptr<sessions::SyncSessionSnapshot> last_snapshot_;
// Whether we've processed the initialization complete callback.
- bool syncapi_initialized_;
+ bool sync_manager_initialized_;
DISALLOW_COPY_AND_ASSIGN(SyncBackendHost);
};
« no previous file with comments | « chrome/browser/sync/engine/verify_updates_command_unittest.cc ('k') | chrome/browser/sync/glue/sync_backend_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698