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

Unified Diff: chrome/browser/password_manager/native_backend_libsecret.cc

Issue 1752383004: CREDENTIAL: Serialize 'PasswordCredential' objects with "" as the federation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 years, 10 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: chrome/browser/password_manager/native_backend_libsecret.cc
diff --git a/chrome/browser/password_manager/native_backend_libsecret.cc b/chrome/browser/password_manager/native_backend_libsecret.cc
index 87e256e711e9feaba0364f05c94a66d58d7e9ae4..8c65356485550e6a6d6bab1d363641fa883c70f7 100644
--- a/chrome/browser/password_manager/native_backend_libsecret.cc
+++ b/chrome/browser/password_manager/native_backend_libsecret.cc
@@ -495,7 +495,11 @@ bool NativeBackendLibsecret::RawAddLogin(const PasswordForm& form) {
"date_synced", base::Int64ToString(date_synced).c_str(),
"display_name", UTF16ToUTF8(form.display_name).c_str(),
"avatar_url", form.icon_url.spec().c_str(),
- "federation_url", form.federation_origin.Serialize().c_str(),
+ // We serialize unique origins as "", in order to make other systems that
+ // read from the login database happy. https://crbug.com/591310
+ "federation_url", form.federation_origin.unique()
+ ? ""
+ : form.federation_origin.Serialize().c_str(),
"should_skip_zero_click", form.skip_zero_click,
"generation_upload_status", form.generation_upload_status,
"form_data", form_data.c_str(),

Powered by Google App Engine
This is Rietveld 408576698