OLD | NEW |
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" | |
11 #include "content/browser/histogram_controller.h" | 10 #include "content/browser/histogram_controller.h" |
12 #include "content/browser/tcmalloc_internals_request_job.h" | 11 #include "content/browser/tcmalloc_internals_request_job.h" |
13 #include "content/common/child_process_messages.h" | 12 #include "content/common/child_process_messages.h" |
14 #include "content/public/common/content_switches.h" | 13 #include "content/public/common/content_switches.h" |
15 | 14 |
16 namespace content { | 15 namespace content { |
17 | 16 |
18 HistogramMessageFilter::HistogramMessageFilter() {} | 17 HistogramMessageFilter::HistogramMessageFilter() {} |
19 | 18 |
20 void HistogramMessageFilter::OnChannelConnected(int32 peer_pid) { | 19 void HistogramMessageFilter::OnChannelConnected(int32 peer_pid) { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 base::HistogramBase* histogram = | 59 base::HistogramBase* histogram = |
61 base::StatisticsRecorder::FindHistogram(name); | 60 base::StatisticsRecorder::FindHistogram(name); |
62 if (!histogram) { | 61 if (!histogram) { |
63 *histogram_json = "{}"; | 62 *histogram_json = "{}"; |
64 } else { | 63 } else { |
65 histogram->WriteJSON(histogram_json); | 64 histogram->WriteJSON(histogram_json); |
66 } | 65 } |
67 } | 66 } |
68 | 67 |
69 } // namespace content | 68 } // namespace content |
OLD | NEW |