Index: chrome/browser/automation/automation_provider.cc |
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc |
index 21a7614d7454326b57532deea9ef0323921d21f2..0e224f8b2df4afb6229c06c3672f40d32ecb0c90 100644 |
--- a/chrome/browser/automation/automation_provider.cc |
+++ b/chrome/browser/automation/automation_provider.cc |
@@ -2077,6 +2077,22 @@ void AutomationProvider::OmniboxAcceptInput(Browser* browser, |
browser->window()->GetLocationBar()->AcceptInput(); |
} |
+// Sample json input: { "command": "GetInitialLoadTimes" } |
+// Refer to InitialLoadObserver::GetTimingInformation() for sample output. |
+void AutomationProvider::GetInitialLoadTimes( |
+ Browser*, |
+ DictionaryValue*, |
+ IPC::Message* reply_message) { |
+ scoped_ptr<DictionaryValue> return_value( |
+ initial_load_observer_->GetTimingInformation()); |
+ |
+ std::string json_return; |
+ base::JSONWriter::Write(return_value.get(), false, &json_return); |
+ AutomationMsg_SendJSONRequest::WriteReplyParams( |
+ reply_message, json_return, true); |
+ Send(reply_message); |
+} |
+ |
// Sample json input: { "command": "GetPluginsInfo" } |
// Refer chrome/test/pyautolib/plugins_info.py for sample json output. |
void AutomationProvider::GetPluginsInfo(Browser* browser, |
@@ -2239,6 +2255,8 @@ void AutomationProvider::SendJSONRequest(int handle, |
handler_map["WaitForAllDownloadsToComplete"] = |
&AutomationProvider::WaitForDownloadsToComplete; |
+ handler_map["GetInitialLoadTimes"] = &AutomationProvider::GetInitialLoadTimes; |
+ |
if (error_string.empty()) { |
if (handler_map.find(std::string(command)) != handler_map.end()) { |
(this->*handler_map[command])(browser, dict_value, reply_message); |