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

Side by Side Diff: components/autofill/core/common/password_form.h

Issue 1723583004: CREDENTIAL: Convert federations from URLs to origins throughout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: iOS2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ 5 #ifndef COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__
6 #define COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ 6 #define COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "components/autofill/core/common/form_data.h" 14 #include "components/autofill/core/common/form_data.h"
15 #include "url/gurl.h" 15 #include "url/gurl.h"
16 #include "url/origin.h"
16 17
17 namespace autofill { 18 namespace autofill {
18 19
19 // The PasswordForm struct encapsulates information about a login form, 20 // The PasswordForm struct encapsulates information about a login form,
20 // which can be an HTML form or a dialog with username/password text fields. 21 // which can be an HTML form or a dialog with username/password text fields.
21 // 22 //
22 // The Web Data database stores saved username/passwords and associated form 23 // The Web Data database stores saved username/passwords and associated form
23 // metdata using a PasswordForm struct, typically one that was created from 24 // metdata using a PasswordForm struct, typically one that was created from
24 // a parsed HTMLFormElement or LoginDialog, but the saved entries could have 25 // a parsed HTMLFormElement or LoginDialog, but the saved entries could have
25 // also been created by imported data from another browser. 26 // also been created by imported data from another browser.
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 base::string16 display_name; 239 base::string16 display_name;
239 240
240 // The URL of this credential's icon, such as the user's avatar, to display 241 // The URL of this credential's icon, such as the user's avatar, to display
241 // in the UI. 242 // in the UI.
242 // TODO(msramek): This field was previously named |avatar_url|. It is still 243 // TODO(msramek): This field was previously named |avatar_url|. It is still
243 // named this way in the password store backends (e.g. the avatar_url column 244 // named this way in the password store backends (e.g. the avatar_url column
244 // in the SQL DB of LoginDatabase) and for the purposes of syncing 245 // in the SQL DB of LoginDatabase) and for the purposes of syncing
245 // (i.e in PasswordSpecificsData). Rename these occurrences. 246 // (i.e in PasswordSpecificsData). Rename these occurrences.
246 GURL icon_url; 247 GURL icon_url;
247 248
248 // The URL of identity provider used for federated login. 249 // The origin of identity provider used for federated login.
249 GURL federation_url; 250 url::Origin federation_origin;
250 251
251 // If true, Chrome will not return this credential to a site in response to 252 // If true, Chrome will not return this credential to a site in response to
252 // 'navigator.credentials.request()' without user interaction. 253 // 'navigator.credentials.request()' without user interaction.
253 // Once user selects this credential the flag is reseted. 254 // Once user selects this credential the flag is reseted.
254 bool skip_zero_click; 255 bool skip_zero_click;
255 256
256 // The layout as determined during parsing. Default value is LAYOUT_OTHER. 257 // The layout as determined during parsing. Default value is LAYOUT_OTHER.
257 Layout layout; 258 Layout layout;
258 259
259 // If true, this form was parsed using Autofill predictions. 260 // If true, this form was parsed using Autofill predictions.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 using ConstPasswordFormMap = std::map<base::string16, const PasswordForm*>; 301 using ConstPasswordFormMap = std::map<base::string16, const PasswordForm*>;
301 302
302 // For testing. 303 // For testing.
303 std::ostream& operator<<(std::ostream& os, PasswordForm::Layout layout); 304 std::ostream& operator<<(std::ostream& os, PasswordForm::Layout layout);
304 std::ostream& operator<<(std::ostream& os, const PasswordForm& form); 305 std::ostream& operator<<(std::ostream& os, const PasswordForm& form);
305 std::ostream& operator<<(std::ostream& os, PasswordForm* form); 306 std::ostream& operator<<(std::ostream& os, PasswordForm* form);
306 307
307 } // namespace autofill 308 } // namespace autofill
308 309
309 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ 310 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698