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

Unified Diff: base/metrics/histogram_snapshot_manager.cc

Issue 10831247: Disable getting histogram data from child processes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | « no previous file | content/browser/histogram_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/histogram_snapshot_manager.cc
===================================================================
--- base/metrics/histogram_snapshot_manager.cc (revision 150944)
+++ base/metrics/histogram_snapshot_manager.cc (working copy)
@@ -4,7 +4,10 @@
#include "base/metrics/histogram_snapshot_manager.h"
+#include "base/compiler_specific.h"
+#include "base/debug/alias.h"
#include "base/metrics/statistics_recorder.h"
+#include "base/string_util.h"
using base::Histogram;
using base::StatisticsRecorder;
@@ -44,6 +47,12 @@
int corruption = histogram.FindCorruption(snapshot);
+ char histogram_name_buf[128];
+ base::strlcpy(histogram_name_buf,
+ histogram_name.c_str(),
+ arraysize(histogram_name_buf));
+ base::debug::Alias(histogram_name_buf);
+
// Crash if we detect that our histograms have been overwritten. This may be
// a fair distance from the memory smasher, but we hope to correlate these
// crashes with other events, such as plugins, or usage patterns, etc.
« no previous file with comments | « no previous file | content/browser/histogram_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698