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

Unified Diff: sync/internal_api/sync_manager.cc

Issue 10451060: sync: migrate invalidation state from syncable::Directory to InvalidationStorage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: include order Created 8 years, 7 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
« no previous file with comments | « chrome/common/pref_names.cc ('k') | sync/internal_api/syncapi_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/sync_manager.cc
diff --git a/sync/internal_api/sync_manager.cc b/sync/internal_api/sync_manager.cc
index e60b212b2a4c931dad00eeb8aa26121db8f56a1f..9da3e2748f30182993e8cef69414d6c68d4ce05a 100644
--- a/sync/internal_api/sync_manager.cc
+++ b/sync/internal_api/sync_manager.cc
@@ -325,8 +325,6 @@ class SyncManager::SyncInternal
const syncable::ModelTypePayloadMap& type_payloads,
sync_notifier::IncomingNotificationSource source) OVERRIDE;
- virtual void StoreState(const std::string& cookie) OVERRIDE;
-
void AddObserver(SyncManager::Observer* observer);
void RemoveObserver(SyncManager::Observer* observer);
@@ -1191,7 +1189,9 @@ bool SyncManager::SyncInternal::SignIn(const SyncCredentials& credentials) {
}
allstatus_.SetUniqueId(unique_id);
sync_notifier_->SetUniqueId(unique_id);
- sync_notifier_->SetState(state);
+ // TODO(tim): Remove once invalidation state has been migrated to new
+ // InvalidationStateTracker store. Bug 124140.
+ sync_notifier_->SetStateDeprecated(state);
UpdateCredentials(credentials);
UpdateEnabledTypes();
@@ -2375,23 +2375,6 @@ void SyncManager::SyncInternal::OnIncomingNotification(
}
}
-void SyncManager::SyncInternal::StoreState(
- const std::string& state) {
- if (!directory()) {
- LOG(ERROR) << "Could not write notification state";
- // TODO(akalin): Propagate result callback all the way to this
- // function and call it with "false" to signal failure.
- return;
- }
- if (VLOG_IS_ON(1)) {
- std::string encoded_state;
- base::Base64Encode(state, &encoded_state);
- DVLOG(1) << "Writing notification state: " << encoded_state;
- }
- directory()->SetNotificationState(state);
- directory()->SaveChanges();
-}
-
void SyncManager::SyncInternal::AddObserver(
SyncManager::Observer* observer) {
observers_.AddObserver(observer);
« no previous file with comments | « chrome/common/pref_names.cc ('k') | sync/internal_api/syncapi_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698