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

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: init 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
Index: sync/internal_api/sync_manager.cc
diff --git a/sync/internal_api/sync_manager.cc b/sync/internal_api/sync_manager.cc
index f33fefa442a4509fa560798f40db1bf469ba92e6..40858e524585313771897a44275fbcad29ea5a35 100644
--- a/sync/internal_api/sync_manager.cc
+++ b/sync/internal_api/sync_manager.cc
@@ -331,8 +331,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);
@@ -1211,7 +1209,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();
@@ -2417,23 +2417,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);

Powered by Google App Engine
This is Rietveld 408576698