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

Side by Side Diff: chrome/browser/password_manager/native_backend_gnome_x.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, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/password_manager/native_backend_gnome_x_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/password_manager/native_backend_gnome_x.h" 5 #include "chrome/browser/password_manager/native_backend_gnome_x.h"
6 6
7 #include <dlfcn.h> 7 #include <dlfcn.h>
8 #include <gnome-keyring.h> 8 #include <gnome-keyring.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 "ssl_valid", form.ssl_valid, 363 "ssl_valid", form.ssl_valid,
364 "preferred", form.preferred, 364 "preferred", form.preferred,
365 "date_created", base::Int64ToString(date_created).c_str(), 365 "date_created", base::Int64ToString(date_created).c_str(),
366 "blacklisted_by_user", form.blacklisted_by_user, 366 "blacklisted_by_user", form.blacklisted_by_user,
367 "type", form.type, 367 "type", form.type,
368 "times_used", form.times_used, 368 "times_used", form.times_used,
369 "scheme", form.scheme, 369 "scheme", form.scheme,
370 "date_synced", base::Int64ToString(date_synced).c_str(), 370 "date_synced", base::Int64ToString(date_synced).c_str(),
371 "display_name", UTF16ToUTF8(form.display_name).c_str(), 371 "display_name", UTF16ToUTF8(form.display_name).c_str(),
372 "avatar_url", form.icon_url.spec().c_str(), 372 "avatar_url", form.icon_url.spec().c_str(),
373 "federation_url", form.federation_origin.Serialize().c_str(), 373 // We serialize unique origins as "", in order to make other systems that
374 // read from the login database happy. https://crbug.com/591310
375 "federation_url", form.federation_origin.unique()
376 ? ""
377 : form.federation_origin.Serialize().c_str(),
374 "should_skip_zero_click", form.skip_zero_click, 378 "should_skip_zero_click", form.skip_zero_click,
375 "generation_upload_status", form.generation_upload_status, 379 "generation_upload_status", form.generation_upload_status,
376 "form_data", form_data.c_str(), 380 "form_data", form_data.c_str(),
377 "application", app_string, 381 "application", app_string,
378 nullptr); 382 nullptr);
379 // clang-format on 383 // clang-format on
380 } 384 }
381 385
382 void GKRMethod::LoginSearch(const PasswordForm& form, 386 void GKRMethod::LoginSearch(const PasswordForm& form,
383 const char* app_string) { 387 const char* app_string) {
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 ScopedVector<PasswordForm> forms; 825 ScopedVector<PasswordForm> forms;
822 if (!GetLoginsBetween(get_begin, get_end, date_to_compare, &forms)) 826 if (!GetLoginsBetween(get_begin, get_end, date_to_compare, &forms))
823 return false; 827 return false;
824 828
825 for (size_t i = 0; i < forms.size(); ++i) { 829 for (size_t i = 0; i < forms.size(); ++i) {
826 if (!RemoveLogin(*forms[i], changes)) 830 if (!RemoveLogin(*forms[i], changes))
827 return false; 831 return false;
828 } 832 }
829 return true; 833 return true;
830 } 834 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/password_manager/native_backend_gnome_x_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698