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

Unified Diff: chrome/browser/autofill/autofill_manager.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, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/time.h ('k') | chrome/browser/autofill/autofill_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_manager.h
diff --git a/chrome/browser/autofill/autofill_manager.h b/chrome/browser/autofill/autofill_manager.h
index d488a30acb6d0523fae1b1506e689763cb74908c..79dab880f0a41bd179d57485220fdbd1391fffaf 100644
--- a/chrome/browser/autofill/autofill_manager.h
+++ b/chrome/browser/autofill/autofill_manager.h
@@ -17,6 +17,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "base/string16.h"
+#include "base/time.h"
#include "chrome/browser/autofill/autofill_download.h"
#include "chrome/browser/autofill/field_types.h"
#include "chrome/browser/autofill/form_structure.h"
@@ -113,10 +114,13 @@ class AutofillManager : public TabContentsObserver,
void UnpackGUIDs(int id, GUIDPair* cc_guid, GUIDPair* profile_guid);
private:
- void OnFormSubmitted(const webkit_glue::FormData& form);
- void OnFormsSeen(const std::vector<webkit_glue::FormData>& forms);
+ void OnFormSubmitted(const webkit_glue::FormData& form,
+ const base::TimeTicks& timestamp);
+ void OnFormsSeen(const std::vector<webkit_glue::FormData>& forms,
+ const base::TimeTicks& timestamp);
void OnTextFieldDidChange(const webkit_glue::FormData& form,
- const webkit_glue::FormField& field);
+ const webkit_glue::FormField& field,
+ const base::TimeTicks& timestamp);
void OnQueryFormFieldAutofill(int query_id,
const webkit_glue::FormData& form,
const webkit_glue::FormField& field);
@@ -126,7 +130,7 @@ class AutofillManager : public TabContentsObserver,
int unique_id);
void OnShowAutofillDialog();
void OnDidPreviewAutofillFormData();
- void OnDidFillAutofillFormData();
+ void OnDidFillAutofillFormData(const base::TimeTicks& timestamp);
void OnDidShowAutofillSuggestions(bool is_new_popup);
// Fills |host| with the RenderViewHost for this tab.
@@ -199,6 +203,12 @@ class AutofillManager : public TabContentsObserver,
// |submitted_form|.
void DeterminePossibleFieldTypesForUpload(FormStructure* submitted_form);
+ // If |initial_interaction_timestamp_| is unset or is set to a later time than
+ // |interaction_timestamp|, updates the cached timestamp. The latter check is
+ // needed because IPC messages can arrive out of order.
+ void UpdateInitialInteractionTimestamp(
+ const base::TimeTicks& interaction_timestamp);
+
// The owning TabContentsWrapper.
TabContentsWrapper* tab_contents_wrapper_;
@@ -233,6 +243,11 @@ class AutofillManager : public TabContentsObserver,
bool user_did_autofill_;
// Has the user edited a field that was previously autofilled?
bool user_did_edit_autofilled_field_;
+ // When the page finished loading.
+ base::TimeTicks forms_loaded_timestamp_;
+ // When the user first interacted with a potentially fillable form on this
+ // page.
+ base::TimeTicks initial_interaction_timestamp_;
// Our copy of the form data.
ScopedVector<FormStructure> form_structures_;
@@ -277,6 +292,7 @@ class AutofillManager : public TabContentsObserver,
FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest,
UserHappinessFormLoadAndSubmission);
FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction);
+ FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, FormFillDuration);
DISALLOW_COPY_AND_ASSIGN(AutofillManager);
};
« no previous file with comments | « base/time.h ('k') | chrome/browser/autofill/autofill_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698