summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_about_handler.cc
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-25 06:10:17 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-25 06:10:17 +0000
commit55e57d4d2326bd98d6e14c92ba055754ef77b0e6 (patch)
tree29f456dcb43fd5754104fe4e302df13532262c83 /chrome/browser/browser_about_handler.cc
parentf78d965fa1ef193595740604508d7d94fde0ef84 (diff)
downloadchromium_src-55e57d4d2326bd98d6e14c92ba055754ef77b0e6.zip
chromium_src-55e57d4d2326bd98d6e14c92ba055754ef77b0e6.tar.gz
chromium_src-55e57d4d2326bd98d6e14c92ba055754ef77b0e6.tar.bz2
Initial support for Renderer Side Histograms
Patch contributed by Raman Tenneti see also patch number 21038 Review URL: http://codereview.chromium.org/27034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10330 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_about_handler.cc')
-rw-r--r--chrome/browser/browser_about_handler.cc16
1 files changed, 14 insertions, 2 deletions
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc
index 7f4c10d..34f2556 100644
--- a/chrome/browser/browser_about_handler.cc
+++ b/chrome/browser/browser_about_handler.cc
@@ -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 @@ std::string BrowserAboutHandler::AboutVersion() {
// 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 @@ std::string BrowserAboutHandler::AboutCredits() {
// 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 @@ std::string BrowserAboutHandler::AboutPlugins() {
// 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;
}