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

Unified Diff: chrome/browser/sync/glue/password_model_associator.cc

Issue 2828021: Take 2: sync changes to support encryption (Closed)
Patch Set: fix flaky password test under valgrind 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 | « chrome/browser/sync/glue/password_change_processor.cc ('k') | chrome/browser/sync/glue/sync_backend_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/password_model_associator.cc
diff --git a/chrome/browser/sync/glue/password_model_associator.cc b/chrome/browser/sync/glue/password_model_associator.cc
index 6eaa7a794ad4515a4c843484b32f94273c308296..e4d2e05f38425c426ec74784e706c4ac2446dd38 100644
--- a/chrome/browser/sync/glue/password_model_associator.cc
+++ b/chrome/browser/sync/glue/password_model_associator.cc
@@ -73,12 +73,8 @@ bool PasswordModelAssociator::AssociateModels() {
sync_api::ReadNode node(&trans);
if (node.InitByClientTagLookup(syncable::PASSWORDS, tag)) {
- sync_pb::PasswordSpecificsData password;
- if (!node.GetPasswordSpecifics(&password)) {
- STLDeleteElements(&passwords);
- LOG(ERROR) << "Failed to get password specifics from sync node.";
- return false;
- }
+ const sync_pb::PasswordSpecificsData& password =
+ node.GetPasswordSpecifics();
DCHECK_EQ(tag, MakeTag(password));
webkit_glue::PasswordForm new_password;
@@ -121,11 +117,8 @@ bool PasswordModelAssociator::AssociateModels() {
LOG(ERROR) << "Failed to fetch child node.";
return false;
}
- sync_pb::PasswordSpecificsData password;
- if (!sync_child_node.GetPasswordSpecifics(&password)) {
- LOG(ERROR) << "Failed to get specifics from password node.";
- return false;
- }
+ const sync_pb::PasswordSpecificsData& password =
+ sync_child_node.GetPasswordSpecifics();
std::string tag = MakeTag(password);
// The password only exists on the server. Add it to the local
« no previous file with comments | « chrome/browser/sync/glue/password_change_processor.cc ('k') | chrome/browser/sync/glue/sync_backend_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698