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

Side by Side Diff: chrome/browser/autofill/autofill_manager.h

Issue 5963004: Add autofill metrics to dig into the failure case. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test Created 9 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/autofill/autofill_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_
6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <list> 9 #include <list>
10 #include <string> 10 #include <string>
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 protected: 79 protected:
80 // For tests. 80 // For tests.
81 AutoFillManager(TabContents* tab_contents, 81 AutoFillManager(TabContents* tab_contents,
82 PersonalDataManager* personal_data); 82 PersonalDataManager* personal_data);
83 83
84 const AutoFillMetrics* metric_logger() const { 84 const AutoFillMetrics* metric_logger() const {
85 return metric_logger_.get(); 85 return metric_logger_.get();
86 } 86 }
87 void set_metric_logger(const AutoFillMetrics* metric_logger); 87 void set_metric_logger(const AutoFillMetrics* metric_logger);
88 88
89 ScopedVector<FormStructure>* form_structures() { return &form_structures_; }
90
89 // Maps GUIDs to and from IDs that are used to identify profiles and credit 91 // Maps GUIDs to and from IDs that are used to identify profiles and credit
90 // cards sent to and from the renderer process. 92 // cards sent to and from the renderer process.
91 virtual int GUIDToID(const std::string& guid); 93 virtual int GUIDToID(const std::string& guid);
92 virtual const std::string IDToGUID(int id); 94 virtual const std::string IDToGUID(int id);
93 95
94 // Methods for packing and unpacking credit card and profile IDs for sending 96 // Methods for packing and unpacking credit card and profile IDs for sending
95 // and receiving to and from the renderer process. 97 // and receiving to and from the renderer process.
96 int PackGUIDs(const std::string& cc_guid, const std::string& profile_guid); 98 int PackGUIDs(const std::string& cc_guid, const std::string& profile_guid);
97 void UnpackGUIDs(int id, std::string* cc_guid, std::string* profile_guid); 99 void UnpackGUIDs(int id, std::string* cc_guid, std::string* profile_guid);
98 100
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 // Set |field| argument's value for phone number based on contents of the 164 // Set |field| argument's value for phone number based on contents of the
163 // |profile|. 165 // |profile|.
164 void FillPhoneNumberField(const AutoFillProfile* profile, 166 void FillPhoneNumberField(const AutoFillProfile* profile,
165 webkit_glue::FormField* field); 167 webkit_glue::FormField* field);
166 168
167 // Parses the forms using heuristic matching and querying the AutoFill server. 169 // Parses the forms using heuristic matching and querying the AutoFill server.
168 void ParseForms(const std::vector<webkit_glue::FormData>& forms); 170 void ParseForms(const std::vector<webkit_glue::FormData>& forms);
169 171
170 // Uses existing personal data to determine possible field types for the 172 // Uses existing personal data to determine possible field types for the
171 // |upload_form_structure_|. 173 // |upload_form_structure_|.
172 void DeterminePossibleFieldTypesForUpload(); 174 void DeterminePossibleFieldTypesForUpload(
175 const FormStructure* cached_upload_form_structure);
173 176
174 // The TabContents hosting this AutoFillManager. 177 // The TabContents hosting this AutoFillManager.
175 // Weak reference. 178 // Weak reference.
176 // May not be NULL. 179 // May not be NULL.
177 TabContents* tab_contents_; 180 TabContents* tab_contents_;
178 181
179 // The personal data manager, used to save and load personal data to/from the 182 // The personal data manager, used to save and load personal data to/from the
180 // web database. Lazily created (in non-test case) since it uses a lot of 183 // web database. Lazily created (in non-test case) since it uses a lot of
181 // memory. 184 // memory.
182 // Weak reference. 185 // Weak reference.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillCreditCardForm); 217 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillCreditCardForm);
215 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillAddressForm); 218 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillAddressForm);
216 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillAddressAndCreditCardForm); 219 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillAddressAndCreditCardForm);
217 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillAutoFilledForm); 220 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillAutoFilledForm);
218 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillPhoneNumber); 221 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillPhoneNumber);
219 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FormChangesRemoveField); 222 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FormChangesRemoveField);
220 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FormChangesAddField); 223 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FormChangesAddField);
221 FRIEND_TEST_ALL_PREFIXES(AutoFillMetricsTest, QualityMetrics); 224 FRIEND_TEST_ALL_PREFIXES(AutoFillMetricsTest, QualityMetrics);
222 FRIEND_TEST_ALL_PREFIXES(AutoFillMetricsTest, 225 FRIEND_TEST_ALL_PREFIXES(AutoFillMetricsTest,
223 NoQualityMetricsForNonAutoFillableForms); 226 NoQualityMetricsForNonAutoFillableForms);
227 FRIEND_TEST_ALL_PREFIXES(AutoFillMetricsTest, QualityMetricsForFailure);
224 228
225 DISALLOW_COPY_AND_ASSIGN(AutoFillManager); 229 DISALLOW_COPY_AND_ASSIGN(AutoFillManager);
226 }; 230 };
227 231
228 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ 232 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autofill/autofill_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698