diff options
Diffstat (limited to 'chrome/browser/browser_about_handler.cc')
-rw-r--r-- | chrome/browser/browser_about_handler.cc | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc index 6c46f18..f699b1e 100644 --- a/chrome/browser/browser_about_handler.cc +++ b/chrome/browser/browser_about_handler.cc @@ -24,6 +24,7 @@ #include "chrome/browser/net/dns_global.h" #include "chrome/browser/renderer_host/render_process_host.h" #include "chrome/browser/renderer_host/render_view_host.h" +#include "chrome/common/histogram_synchronizer.h" #include "chrome/common/jstemplate_builder.h" #include "chrome/common/pref_names.h" #include "chrome/common/pref_service.h" @@ -45,6 +46,9 @@ #include "chrome/browser/views/about_network_dialog.h" #endif +using base::Time; +using base::TimeDelta; + namespace { // The paths used for the about pages. @@ -137,16 +141,14 @@ std::string AboutDns() { } std::string AboutHistograms(const std::string& query) { - std::string data; - for (RenderProcessHost::iterator it = RenderProcessHost::begin(); - it != RenderProcessHost::end(); ++it) { - it->second->Send(new ViewMsg_GetRendererHistograms()); - } + TimeDelta wait_time = TimeDelta::FromMilliseconds(10000); - // TODO(raman): Delay page layout until we get respnoses - // back from renderers, and not have to use a fixed size delay. - PlatformThread::Sleep(1000); + HistogramSynchronizer* current_synchronizer = + HistogramSynchronizer::CurrentSynchronizer(); + DCHECK(current_synchronizer != NULL); + current_synchronizer->FetchRendererHistogramsSynchronously(wait_time); + std::string data; StatisticsRecorder::WriteHTMLGraph(query, &data); return data; } |