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

Unified Diff: chrome/browser/browser_about_handler.cc

Issue 27034: Initial support for Renderer Side Histograms... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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 | « base/histogram.cc ('k') | chrome/browser/metrics/metrics_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_about_handler.cc
===================================================================
--- chrome/browser/browser_about_handler.cc (revision 10329)
+++ chrome/browser/browser_about_handler.cc (working copy)
@@ -9,6 +9,7 @@
#include "base/file_version_info.h"
#include "base/histogram.h"
+#include "base/platform_thread.h"
#include "base/stats_table.h"
#include "base/string_piece.h"
#include "base/string_util.h"
@@ -21,11 +22,13 @@
#include "chrome/browser/net/dns_global.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/profile_manager.h"
+#include "chrome/browser/renderer_host/render_process_host.h"
#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/common/jstemplate_builder.h"
#include "chrome/common/l10n_util.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/pref_service.h"
+#include "chrome/common/render_messages.h"
#include "chrome/common/resource_bundle.h"
#include "chrome/renderer/about_handler.h"
#include "googleurl/src/gurl.h"
@@ -292,7 +295,7 @@
// static
std::string BrowserAboutHandler::AboutCredits() {
- static const std::string credits_html =
+ static const std::string credits_html =
ResourceBundle::GetSharedInstance().GetDataResource(
IDR_CREDITS_HTML);
@@ -301,7 +304,7 @@
// static
std::string BrowserAboutHandler::AboutTerms() {
- static const std::string terms_html =
+ static const std::string terms_html =
ResourceBundle::GetSharedInstance().GetDataResource(
IDR_TERMS_HTML);
@@ -344,6 +347,15 @@
// static
std::string BrowserAboutHandler::AboutHistograms(const std::string& query) {
std::string data;
+ for (RenderProcessHost::iterator it = RenderProcessHost::begin();
+ it != RenderProcessHost::end(); ++it) {
+ it->second->Send(new ViewMsg_GetRendererHistograms());
+ }
+
+ // TODO(raman): Delay page layout until we get respnoses
+ // back from renderers, and not have to use a fixed size delay.
+ PlatformThread::Sleep(1000);
+
StatisticsRecorder::WriteHTMLGraph(query, &data);
return data;
}
« no previous file with comments | « base/histogram.cc ('k') | chrome/browser/metrics/metrics_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698