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

Unified Diff: chrome/renderer/autofill/autofill_agent.cc

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 | « chrome/common/autofill_messages.h ('k') | chrome/renderer/autofill/form_autocomplete_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/autofill/autofill_agent.cc
diff --git a/chrome/renderer/autofill/autofill_agent.cc b/chrome/renderer/autofill/autofill_agent.cc
index 9b55fcc8aab6b27f37f315cdeeac960b69a72246..98334d78410018bbcd6061cee2f61fd38f7ff8b8 100644
--- a/chrome/renderer/autofill/autofill_agent.cc
+++ b/chrome/renderer/autofill/autofill_agent.cc
@@ -5,6 +5,7 @@
#include "chrome/renderer/autofill/autofill_agent.h"
#include "base/message_loop.h"
+#include "base/time.h"
#include "base/utf_string_conversions.h"
#include "chrome/common/autofill_messages.h"
#include "chrome/common/chrome_constants.h"
@@ -79,8 +80,10 @@ void AutofillAgent::DidFinishDocumentLoad(WebFrame* frame) {
std::vector<webkit_glue::FormData> forms;
form_manager_.ExtractForms(frame, &forms);
- if (!forms.empty())
- Send(new AutofillHostMsg_FormsSeen(routing_id(), forms));
+ if (!forms.empty()) {
+ Send(new AutofillHostMsg_FormsSeen(routing_id(), forms,
+ base::TimeTicks::Now()));
+ }
}
void AutofillAgent::FrameDetached(WebFrame* frame) {
@@ -100,7 +103,8 @@ void AutofillAgent::WillSubmitForm(WebFrame* frame,
static_cast<FormManager::ExtractMask>(
FormManager::EXTRACT_VALUE | FormManager::EXTRACT_OPTION_TEXT),
&form_data)) {
- Send(new AutofillHostMsg_FormSubmitted(routing_id(), form_data));
+ Send(new AutofillHostMsg_FormSubmitted(routing_id(), form_data,
+ base::TimeTicks::Now()));
}
}
@@ -201,8 +205,10 @@ void AutofillAgent::TextFieldDidChangeImpl(const WebInputElement& element) {
webkit_glue::FormData form;
webkit_glue::FormField field;
- if (FindFormAndFieldForNode(element, &form, &field))
- Send(new AutofillHostMsg_TextFieldDidChange(routing_id(), form, field));
+ if (FindFormAndFieldForNode(element, &form, &field)) {
+ Send(new AutofillHostMsg_TextFieldDidChange(routing_id(), form, field,
+ base::TimeTicks::Now()));
+ }
}
void AutofillAgent::textFieldDidReceiveKeyDown(const WebInputElement& element,
@@ -311,7 +317,8 @@ void AutofillAgent::OnFormDataFilled(int query_id,
switch (autofill_action_) {
case AUTOFILL_FILL:
form_manager_.FillForm(form, autofill_query_element_);
- Send(new AutofillHostMsg_DidFillAutofillFormData(routing_id()));
+ Send(new AutofillHostMsg_DidFillAutofillFormData(routing_id(),
+ base::TimeTicks::Now()));
break;
case AUTOFILL_PREVIEW:
form_manager_.PreviewForm(form, autofill_query_element_);
« no previous file with comments | « chrome/common/autofill_messages.h ('k') | chrome/renderer/autofill/form_autocomplete_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698