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

Unified Diff: chrome/browser/metrics/metrics_service.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 | « chrome/browser/metrics/metrics_service.h ('k') | chrome/browser/renderer_host/resource_message_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/metrics_service.cc
===================================================================
--- chrome/browser/metrics/metrics_service.cc (revision 10329)
+++ chrome/browser/metrics/metrics_service.cc (working copy)
@@ -1755,9 +1755,21 @@
RecordPluginChanges(pref);
}
+void MetricsService::CollectRendererHistograms() {
+ for (RenderProcessHost::iterator it = RenderProcessHost::begin();
+ it != RenderProcessHost::end(); ++it) {
+ it->second->Send(new ViewMsg_GetRendererHistograms());
+ }
+}
+
void MetricsService::RecordCurrentHistograms() {
DCHECK(current_log_);
+ CollectRendererHistograms();
+
+ // TODO(raman): Delay the metrics collection activities until we get all the
+ // updates from the renderers, or we time out (1 second? 3 seconds?).
+
StatisticsRecorder::Histograms histograms;
StatisticsRecorder::GetHistograms(&histograms);
for (StatisticsRecorder::Histograms::iterator it = histograms.begin();
« no previous file with comments | « chrome/browser/metrics/metrics_service.h ('k') | chrome/browser/renderer_host/resource_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698