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

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

Issue 7740070: Add metrics to measure time elapsed between form load and form submission with or without Autofill. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Once more, with feeling Created 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/autofill/autofill_type.cc ('k') | chrome/browser/autofill/form_structure.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_FORM_STRUCTURE_H_ 5 #ifndef CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_
6 #define CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_ 6 #define CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 12 matching lines...) Expand all
23 }; 23 };
24 24
25 enum UploadRequired { 25 enum UploadRequired {
26 UPLOAD_NOT_REQUIRED, 26 UPLOAD_NOT_REQUIRED,
27 UPLOAD_REQUIRED, 27 UPLOAD_REQUIRED,
28 USE_UPLOAD_RATES 28 USE_UPLOAD_RATES
29 }; 29 };
30 30
31 class AutofillMetrics; 31 class AutofillMetrics;
32 32
33 namespace base {
34 class TimeTicks;
35 }
36
33 namespace buzz { 37 namespace buzz {
34 class XmlElement; 38 class XmlElement;
35 } 39 }
36 40
37 namespace webkit_glue { 41 namespace webkit_glue {
38 struct FormData; 42 struct FormData;
39 struct FormDataPredictions; 43 struct FormDataPredictions;
40 } 44 }
41 45
42 // FormStructure stores a single HTML form together with the values entered 46 // FormStructure stores a single HTML form together with the values entered
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // Returns true if we should query the crowdsourcing server to determine this 103 // Returns true if we should query the crowdsourcing server to determine this
100 // form's field types. If the form includes author-specified types, this will 104 // form's field types. If the form includes author-specified types, this will
101 // return false. 105 // return false.
102 bool ShouldBeCrowdsourced() const; 106 bool ShouldBeCrowdsourced() const;
103 107
104 // Sets the field types and experiment id to be those set for |cached_form|. 108 // Sets the field types and experiment id to be those set for |cached_form|.
105 void UpdateFromCache(const FormStructure& cached_form); 109 void UpdateFromCache(const FormStructure& cached_form);
106 110
107 // Logs quality metrics for |this|, which should be a user-submitted form. 111 // Logs quality metrics for |this|, which should be a user-submitted form.
108 // This method should only be called after the possible field types have been 112 // This method should only be called after the possible field types have been
109 // set for each field. 113 // set for each field. |interaction_time| should be a timestamp corresponding
110 void LogQualityMetrics(const AutofillMetrics& metric_logger) const; 114 // to the user's first interaction with the form. |submission_time| should be
115 // a timestamp corresponding to the form's submission.
116 void LogQualityMetrics(const AutofillMetrics& metric_logger,
117 const base::TimeTicks& load_time,
118 const base::TimeTicks& interaction_time,
119 const base::TimeTicks& submission_time) const;
111 120
112 const AutofillField* field(size_t index) const; 121 const AutofillField* field(size_t index) const;
113 AutofillField* field(size_t index); 122 AutofillField* field(size_t index);
114 size_t field_count() const; 123 size_t field_count() const;
115 124
116 // Returns the number of fields that are able to be autofilled. 125 // Returns the number of fields that are able to be autofilled.
117 size_t autofill_count() const { return autofill_count_; } 126 size_t autofill_count() const { return autofill_count_; }
118 127
119 // Used for iterating over the fields. 128 // Used for iterating over the fields.
120 std::vector<AutofillField*>::const_iterator begin() const { 129 std::vector<AutofillField*>::const_iterator begin() const {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 RequestMethod method_; 208 RequestMethod method_;
200 209
201 // Whether the form includes any field types explicitly specified by the site 210 // Whether the form includes any field types explicitly specified by the site
202 // author, via the |autocompletetype| attribute. 211 // author, via the |autocompletetype| attribute.
203 bool has_author_specified_types_; 212 bool has_author_specified_types_;
204 213
205 DISALLOW_COPY_AND_ASSIGN(FormStructure); 214 DISALLOW_COPY_AND_ASSIGN(FormStructure);
206 }; 215 };
207 216
208 #endif // CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_ 217 #endif // CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_type.cc ('k') | chrome/browser/autofill/form_structure.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698