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

Side by Side Diff: components/autofill/core/browser/form_structure.h

Issue 23432002: Generate passwords only for forms that autofill server marks as account creation forms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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_BROWSER_FORM_STRUCTURE_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_STRUCTURE_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_STRUCTURE_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_STRUCTURE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 18 matching lines...) Expand all
29 }; 29 };
30 30
31 namespace base { 31 namespace base {
32 class TimeTicks; 32 class TimeTicks;
33 } 33 }
34 34
35 namespace buzz { 35 namespace buzz {
36 class XmlElement; 36 class XmlElement;
37 } 37 }
38 38
39 FORWARD_DECLARE_TEST(PasswordGenerationManagerTest, DetectAccountCreationForms);
40
39 namespace autofill { 41 namespace autofill {
40 42
41 class AutofillMetrics; 43 class AutofillMetrics;
42 44
43 struct AutocheckoutPageMetaData; 45 struct AutocheckoutPageMetaData;
44 struct FormData; 46 struct FormData;
45 struct FormDataPredictions; 47 struct FormDataPredictions;
46 48
47 // FormStructure stores a single HTML form together with the values entered 49 // FormStructure stores a single HTML form together with the values entered
48 // in the fields along with additional information needed by Autofill. 50 // in the fields along with additional information needed by Autofill.
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 bool filled_by_autocheckout() const { return filled_by_autocheckout_; } 169 bool filled_by_autocheckout() const { return filled_by_autocheckout_; }
168 void set_filled_by_autocheckout(bool filled_by_autocheckout) { 170 void set_filled_by_autocheckout(bool filled_by_autocheckout) {
169 filled_by_autocheckout_ = filled_by_autocheckout; 171 filled_by_autocheckout_ = filled_by_autocheckout;
170 } 172 }
171 173
172 bool operator==(const FormData& form) const; 174 bool operator==(const FormData& form) const;
173 bool operator!=(const FormData& form) const; 175 bool operator!=(const FormData& form) const;
174 176
175 private: 177 private:
176 friend class FormStructureTest; 178 friend class FormStructureTest;
179 FRIEND_TEST_ALL_PREFIXES(::PasswordGenerationManagerTest,
180 DetectAccountCreationForms);
Ilya Sherman 2013/08/29 23:08:13 What exactly do you need to use from the private s
zysxqn 2013/09/03 23:00:20 Done.
177 FRIEND_TEST_ALL_PREFIXES(AutofillDownloadTest, QueryAndUploadTest); 181 FRIEND_TEST_ALL_PREFIXES(AutofillDownloadTest, QueryAndUploadTest);
178 182
179 // 64-bit hash of the string - used in FormSignature and unit-tests. 183 // 64-bit hash of the string - used in FormSignature and unit-tests.
180 static std::string Hash64Bit(const std::string& str); 184 static std::string Hash64Bit(const std::string& str);
181 185
182 enum EncodeRequestType { 186 enum EncodeRequestType {
183 QUERY, 187 QUERY,
184 UPLOAD, 188 UPLOAD,
185 FIELD_ASSIGNMENTS, 189 FIELD_ASSIGNMENTS,
186 }; 190 };
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 257
254 // Whether or not this form was filled by Autocheckout. 258 // Whether or not this form was filled by Autocheckout.
255 bool filled_by_autocheckout_; 259 bool filled_by_autocheckout_;
256 260
257 DISALLOW_COPY_AND_ASSIGN(FormStructure); 261 DISALLOW_COPY_AND_ASSIGN(FormStructure);
258 }; 262 };
259 263
260 } // namespace autofill 264 } // namespace autofill
261 265
262 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_STRUCTURE_H_ 266 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_STRUCTURE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698