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

Side by Side Diff: components/password_manager/core/browser/login_database.cc

Issue 1755053002: CREDENTIAL: Serialize 'PasswordCredential' objects with "" as the federation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/password_manager/core/browser/login_database.h" 5 #include "components/password_manager/core/browser/login_database.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <algorithm> 9 #include <algorithm>
10 #include <limits> 10 #include <limits>
(...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 s.BindBlob(4, pickle.data(), pickle.size()); 934 s.BindBlob(4, pickle.data(), pickle.size());
935 s.BindInt(5, form.times_used); 935 s.BindInt(5, form.times_used);
936 s.BindString16(6, form.submit_element); 936 s.BindString16(6, form.submit_element);
937 s.BindInt64(7, form.date_synced.ToInternalValue()); 937 s.BindInt64(7, form.date_synced.ToInternalValue());
938 s.BindInt64(8, form.date_created.ToInternalValue()); 938 s.BindInt64(8, form.date_created.ToInternalValue());
939 s.BindInt(9, form.blacklisted_by_user); 939 s.BindInt(9, form.blacklisted_by_user);
940 s.BindInt(10, form.scheme); 940 s.BindInt(10, form.scheme);
941 s.BindInt(11, form.type); 941 s.BindInt(11, form.type);
942 s.BindString16(12, form.display_name); 942 s.BindString16(12, form.display_name);
943 s.BindString(13, form.icon_url.spec()); 943 s.BindString(13, form.icon_url.spec());
944 s.BindString(14, form.federation_origin.Serialize()); 944 // We serialize unique origins as "", in order to make other systems that
945 // read from the login database happy. https://crbug.com/591310
946 s.BindString(14, form.federation_origin.unique()
947 ? ""
vasilii 2016/03/02 11:45:00 std::string()
948 : form.federation_origin.Serialize());
945 s.BindInt(15, form.skip_zero_click); 949 s.BindInt(15, form.skip_zero_click);
946 s.BindInt(16, form.generation_upload_status); 950 s.BindInt(16, form.generation_upload_status);
947 951
948 // WHERE starts here. 952 // WHERE starts here.
949 s.BindString(17, form.origin.spec()); 953 s.BindString(17, form.origin.spec());
950 s.BindString16(18, form.username_element); 954 s.BindString16(18, form.username_element);
951 s.BindString16(19, form.username_value); 955 s.BindString16(19, form.username_value);
952 s.BindString16(20, form.password_element); 956 s.BindString16(20, form.password_element);
953 s.BindString(21, form.signon_realm); 957 s.BindString(21, form.signon_realm);
954 958
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
1326 UMA_HISTOGRAM_ENUMERATION("PasswordManager.PslDomainMatchTriggering", 1330 UMA_HISTOGRAM_ENUMERATION("PasswordManager.PslDomainMatchTriggering",
1327 psl_domain_match_metric, PSL_DOMAIN_MATCH_COUNT); 1331 psl_domain_match_metric, PSL_DOMAIN_MATCH_COUNT);
1328 } 1332 }
1329 1333
1330 if (!statement->Succeeded()) 1334 if (!statement->Succeeded())
1331 return false; 1335 return false;
1332 return true; 1336 return true;
1333 } 1337 }
1334 1338
1335 } // namespace password_manager 1339 } // namespace password_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698