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

Side by Side Diff: components/password_manager/core/common/credential_manager_types.cc

Issue 1832933002: Update the |skip_zero_click| flag of a credential when selected in the account chooser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 4 years, 8 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/common/credential_manager_types.h" 5 #include "components/password_manager/core/common/credential_manager_types.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "components/autofill/core/common/password_form.h" 8 #include "components/autofill/core/common/password_form.h"
9 9
10 namespace password_manager { 10 namespace password_manager {
11 11
12 std::ostream& operator<<(std::ostream& out, CredentialType type) {
13 return out << static_cast<int>(type);
14 }
15
12 CredentialInfo::CredentialInfo() : type(CredentialType::CREDENTIAL_TYPE_EMPTY) { 16 CredentialInfo::CredentialInfo() : type(CredentialType::CREDENTIAL_TYPE_EMPTY) {
13 } 17 }
14 18
15 CredentialInfo::CredentialInfo(const autofill::PasswordForm& form, 19 CredentialInfo::CredentialInfo(const autofill::PasswordForm& form,
16 CredentialType form_type) 20 CredentialType form_type)
17 : type(form_type), 21 : type(form_type),
18 id(form.username_value), 22 id(form.username_value),
19 name(form.display_name), 23 name(form.display_name),
20 icon(form.icon_url), 24 icon(form.icon_url),
21 password(form.password_value), 25 password(form.password_value),
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 form->username_value = info.id; 67 form->username_value = info.id;
64 return form; 68 return form;
65 } 69 }
66 bool CredentialInfo::operator==(const CredentialInfo& rhs) const { 70 bool CredentialInfo::operator==(const CredentialInfo& rhs) const {
67 return (type == rhs.type && id == rhs.id && name == rhs.name && 71 return (type == rhs.type && id == rhs.id && name == rhs.name &&
68 icon == rhs.icon && password == rhs.password && 72 icon == rhs.icon && password == rhs.password &&
69 federation.Serialize() == rhs.federation.Serialize()); 73 federation.Serialize() == rhs.federation.Serialize());
70 } 74 }
71 75
72 } // namespace password_manager 76 } // namespace password_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698