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

Side by Side Diff: content/browser/histogram_message_filter.cc

Issue 12207058: Connect SparseHistogram with the rest of stats system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/histogram_message_filter.h" 5 #include "content/browser/histogram_message_filter.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/metrics/statistics_recorder.h" 9 #include "base/metrics/statistics_recorder.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 CommandLine::ForCurrentProcess()->HasSwitch( 56 CommandLine::ForCurrentProcess()->HasSwitch(
57 switches::kReduceSecurityForDomAutomationTests); 57 switches::kReduceSecurityForDomAutomationTests);
58 58
59 if (!using_dom_controller || !reduced_security) { 59 if (!using_dom_controller || !reduced_security) {
60 LOG(ERROR) << "Attempt at reading browser histogram without specifying " 60 LOG(ERROR) << "Attempt at reading browser histogram without specifying "
61 << "--" << switches::kDomAutomationController << " and " 61 << "--" << switches::kDomAutomationController << " and "
62 << "--" << switches::kReduceSecurityForDomAutomationTests 62 << "--" << switches::kReduceSecurityForDomAutomationTests
63 << " switches."; 63 << " switches.";
64 return; 64 return;
65 } 65 }
66 base::Histogram* histogram = base::StatisticsRecorder::FindHistogram(name); 66 base::HistogramBase* histogram =
67 base::StatisticsRecorder::FindHistogram(name);
67 if (!histogram) { 68 if (!histogram) {
68 *histogram_json = "{}"; 69 *histogram_json = "{}";
69 } else { 70 } else {
70 histogram->WriteJSON(histogram_json); 71 histogram->WriteJSON(histogram_json);
71 } 72 }
72 } 73 }
73 74
74 } // namespace content 75 } // namespace content
OLDNEW
« no previous file with comments | « chrome/test/base/uma_histogram_helper.cc ('k') | content/common/child_histogram_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698