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

Unified Diff: components/password_manager/core/browser/password_syncable_service.cc

Issue 283563002: Password Login Database: report correct changes from AddLogin(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed PasswordSyncableServiceTest.PasswordStoreChanges Created 6 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: components/password_manager/core/browser/password_syncable_service.cc
diff --git a/components/password_manager/core/browser/password_syncable_service.cc b/components/password_manager/core/browser/password_syncable_service.cc
index ae886fa46ace878a23e5373faf7376ee2aef6f9d..61d1d40a64f1fb569d662d4bc5ea139233143a1e 100644
--- a/components/password_manager/core/browser/password_syncable_service.cc
+++ b/components/password_manager/core/browser/password_syncable_service.cc
@@ -275,10 +275,12 @@ void PasswordSyncableService::ActOnPasswordStoreChanges(
for (PasswordStoreChangeList::const_iterator it = local_changes.begin();
it != local_changes.end();
++it) {
+ syncer::SyncData data = (it->type() == PasswordStoreChange::REMOVE ?
+ syncer::SyncData::CreateLocalDelete(MakePasswordSyncTag(it->form()),
+ syncer::PASSWORDS) :
+ SyncDataFromPassword(it->form()));
sync_changes.push_back(
- syncer::SyncChange(FROM_HERE,
- GetSyncChangeType(it->type()),
- SyncDataFromPassword(it->form())));
+ syncer::SyncChange(FROM_HERE, GetSyncChangeType(it->type()), data));
}
sync_processor_->ProcessSyncChanges(FROM_HERE, sync_changes);
}

Powered by Google App Engine
This is Rietveld 408576698