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

Unified Diff: chrome/browser/sync/engine/syncapi.cc

Issue 2858027: Update the Nigori node when the passphrase changes. (Closed)
Patch Set: rebase Created 10 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
« no previous file with comments | « no previous file | chrome/browser/sync/profile_sync_service_password_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/engine/syncapi.cc
diff --git a/chrome/browser/sync/engine/syncapi.cc b/chrome/browser/sync/engine/syncapi.cc
index 1012bf7b5b02d1aa979280a2bf7967bd985a1d6c..e0a1d415a623c7e1355f086a832b89ef7a3511eb 100644
--- a/chrome/browser/sync/engine/syncapi.cc
+++ b/chrome/browser/sync/engine/syncapi.cc
@@ -1508,8 +1508,18 @@ void SyncManager::SyncInternal::SetPassphrase(
// passphrase get applied as soon as possible.
sync_manager_->RequestNudge();
} else {
+ WriteTransaction trans(GetUserShare());
+ WriteNode node(&trans);
+ if (!node.InitByTagLookup(kNigoriTag)) {
+ // TODO(albertb): Plumb an UnrecoverableError all the way back to the PSS.
+ NOTREACHED();
+ return;
+ }
cryptographer->AddKey(params);
- // TODO(albertb): Update the Nigori node on the server with the new keys.
+
+ sync_pb::NigoriSpecifics specifics;
+ cryptographer->GetKeys(specifics.mutable_encrypted());
+ node.SetNigoriSpecifics(specifics);
}
observer_->OnPassphraseAccepted();
}
« no previous file with comments | « no previous file | chrome/browser/sync/profile_sync_service_password_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698