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

Unified Diff: content/renderer/dom_automation_controller.cc

Issue 12389073: Collect tab timing information for use in telementry-based startup tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix review comments Created 7 years, 9 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
Index: content/renderer/dom_automation_controller.cc
diff --git a/content/renderer/dom_automation_controller.cc b/content/renderer/dom_automation_controller.cc
index 1718d646026c2a16369d1007b64a448508dacf4e..9c051e05d450e8eb973bcc15d9c536940e796128 100644
--- a/content/renderer/dom_automation_controller.cc
+++ b/content/renderer/dom_automation_controller.cc
@@ -37,6 +37,9 @@ DomAutomationController::DomAutomationController()
BindCallback("getBrowserHistogram",
base::Bind(&DomAutomationController::GetBrowserHistogram,
base::Unretained(this)));
+ BindCallback("getTabLoadTimingInformation",
+ base::Bind(&DomAutomationController::GetTabLoadTimingInformation,
+ base::Unretained(this)));
}
void DomAutomationController::Send(const CppArgumentList& args,
@@ -213,4 +216,19 @@ void DomAutomationController::GetBrowserHistogram(const CppArgumentList& args,
result->Set(histogram_json);
}
+void DomAutomationController::GetTabLoadTimingInformation(
+ const CppArgumentList& args,
+ CppVariant* result) {
+ if (!sender_) {
+ NOTREACHED();
+ result->SetNull();
+ return;
+ }
+
+ std::string tab_timing_json;
+ sender_->Send(
+ new ChildProcessHostMsg_GetTabLoadTimingInformation(&tab_timing_json));
+ result->Set(tab_timing_json);
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698