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

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

Issue 578383002: mac: Only show the access Address Book prompt a fixed number of times. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@autofill-contacts
Patch Set: Comments from isherman, round 2. Created 6 years, 3 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_FORM_DATA_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_COMMON_FORM_DATA_H_
6 #define COMPONENTS_AUTOFILL_CORE_COMMON_FORM_DATA_H_ 6 #define COMPONENTS_AUTOFILL_CORE_COMMON_FORM_DATA_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
11 #include "components/autofill/core/common/form_field_data.h" 11 #include "components/autofill/core/common/form_field_data.h"
12 #include "url/gurl.h" 12 #include "url/gurl.h"
13 13
14 namespace autofill { 14 namespace autofill {
15 15
16 // Holds information about a form to be filled and/or submitted. 16 // Holds information about a form to be filled and/or submitted.
17 struct FormData { 17 struct FormData {
18 FormData(); 18 FormData();
19 FormData(const FormData& data); 19 FormData(const FormData& data);
20 ~FormData(); 20 ~FormData();
21 21
22 // Used in testing. 22 // Used in testing, and in recording metrics and setting preferences, where
23 // false positives/negatives aren't super important.
23 bool operator==(const FormData& form) const; 24 bool operator==(const FormData& form) const;
24 bool operator!=(const FormData& form) const; 25 bool operator!=(const FormData& form) const;
25 26
26 // Allow FormData to be a key in STL containers. 27 // Allow FormData to be a key in STL containers.
27 bool operator<(const FormData& form) const; 28 bool operator<(const FormData& form) const;
28 29
29 // The name of the form. 30 // The name of the form.
30 base::string16 name; 31 base::string16 name;
31 // The URL (minus query parameters) containing the form. 32 // The URL (minus query parameters) containing the form.
32 GURL origin; 33 GURL origin;
(...skipping 11 matching lines...) Expand all
44 // Serialize FormData. Used by the PasswordManager to persist FormData 45 // Serialize FormData. Used by the PasswordManager to persist FormData
45 // pertaining to password forms. Serialized data is appended to |pickle| 46 // pertaining to password forms. Serialized data is appended to |pickle|
46 void SerializeFormData(const FormData& form_data, Pickle* pickle); 47 void SerializeFormData(const FormData& form_data, Pickle* pickle);
47 // Deserialize FormData. This assumes that |iter| is currently pointing to 48 // Deserialize FormData. This assumes that |iter| is currently pointing to
48 // the part of a pickle created by SerializeFormData. Returns true on success. 49 // the part of a pickle created by SerializeFormData. Returns true on success.
49 bool DeserializeFormData(PickleIterator* iter, FormData* form_data); 50 bool DeserializeFormData(PickleIterator* iter, FormData* form_data);
50 51
51 } // namespace autofill 52 } // namespace autofill
52 53
53 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_FORM_DATA_H_ 54 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_FORM_DATA_H_
OLDNEW
« no previous file with comments | « components/autofill/core/common/autofill_pref_names.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698