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

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

Issue 7655055: [Sync] Make BackendMigrator not wait for full sync cycles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mac test Created 9 years, 4 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 5a0b0f638af4abbf0f5a731cc6ee76937ec75084..33570604509ce58ae7bb87678bd728fed6ebb282 100644
--- a/chrome/browser/sync/glue/sync_backend_host.h
+++ b/chrome/browser/sync/glue/sync_backend_host.h
@@ -117,7 +117,7 @@ class SyncBackendHost {
// Create a SyncBackendHost with a reference to the |frontend| that it serves
// and communicates to via the SyncFrontend interface (on the same thread
// it used to call the constructor).
- explicit SyncBackendHost(Profile* profile);
+ SyncBackendHost(const std::string& name, Profile* profile);
// For testing.
// TODO(skrul): Extract an interface so this is not needed.
SyncBackendHost();
@@ -179,6 +179,10 @@ class SyncBackendHost {
syncable::ModelTypeSet GetEncryptedDataTypes() const;
+ // Returns the set of types for which there is no sync data.
+ // Overrideable for testing.
+ virtual syncable::ModelTypeSet GetUnsyncedDataTypes() const;
+
// Activates change processing for the given data type. This must
// be called synchronously with the data type's model association so
// no changes are dropped between model association and change
@@ -248,7 +252,7 @@ class SyncBackendHost {
class Core : public base::RefCountedThreadSafe<SyncBackendHost::Core>,
public sync_api::SyncManager::Observer {
public:
- Core(Profile* profile, SyncBackendHost* backend);
+ Core(const std::string& name, SyncBackendHost* backend);
// SyncManager::Observer implementation. The Core just acts like an air
// traffic controller here, forwarding incoming messages to appropriate
@@ -437,7 +441,8 @@ class SyncBackendHost {
void FinishConfigureDataTypesOnFrontendLoop();
- Profile* profile_;
+ // Name used for debugging.
+ const std::string name_;
// Our parent SyncBackendHost
SyncBackendHost* host_;
@@ -523,7 +528,10 @@ class SyncBackendHost {
// to safely talk back to the SyncFrontend.
MessageLoop* const frontend_loop_;
- Profile* profile_;
+ Profile* const profile_;
+
+ // Name used for debugging (set from profile_->GetDebugName()).
+ const std::string name_;
sync_notifier::SyncNotifierFactory sync_notifier_factory_;

Powered by Google App Engine
This is Rietveld 408576698