| Index: content/renderer/dom_automation_controller.cc
|
| diff --git a/content/renderer/dom_automation_controller.cc b/content/renderer/dom_automation_controller.cc
|
| index 6f4b27a6fadbc14d7ad39bdb7dd855501e2336d9..8c4847ccb0e34ec6bb59f7a2bc313cb4463367e3 100644
|
| --- a/content/renderer/dom_automation_controller.cc
|
| +++ b/content/renderer/dom_automation_controller.cc
|
| @@ -10,6 +10,7 @@
|
| #include "base/metrics/histogram.h"
|
| #include "base/metrics/statistics_recorder.h"
|
| #include "base/string_util.h"
|
| +#include "content/common/child_process_messages.h"
|
| #include "content/common/view_messages.h"
|
|
|
| using webkit_glue::CppArgumentList;
|
| @@ -33,6 +34,9 @@ DomAutomationController::DomAutomationController()
|
| BindCallback("getHistogram",
|
| base::Bind(&DomAutomationController::GetHistogram,
|
| base::Unretained(this)));
|
| + BindCallback("getBrowserHistogram",
|
| + base::Bind(&DomAutomationController::GetBrowserHistogram,
|
| + base::Unretained(this)));
|
| }
|
|
|
| void DomAutomationController::Send(const CppArgumentList& args,
|
| @@ -191,4 +195,23 @@ void DomAutomationController::GetHistogram(const CppArgumentList& args,
|
| result->Set(output);
|
| }
|
|
|
| +void DomAutomationController::GetBrowserHistogram(const CppArgumentList& args,
|
| + CppVariant* result) {
|
| + if (args.size() != 1) {
|
| + result->SetNull();
|
| + return;
|
| + }
|
| +
|
| + if (!sender_) {
|
| + NOTREACHED();
|
| + result->SetNull();
|
| + return;
|
| + }
|
| +
|
| + std::string histogram_json;
|
| + sender_->Send(new ChildProcessHostMsg_GetBrowserHistogram(
|
| + args[0].ToString(), &histogram_json));
|
| + result->Set(histogram_json);
|
| +}
|
| +
|
| } // namespace content
|
|
|