| 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 "content/browser/histogram_controller.h" |  10 #include "content/browser/histogram_controller.h" | 
|  11 #include "content/browser/tcmalloc_internals_request_job.h" |  | 
|  12 #include "content/common/child_process_messages.h" |  11 #include "content/common/child_process_messages.h" | 
|  13 #include "content/public/common/content_switches.h" |  12 #include "content/public/common/content_switches.h" | 
|  14  |  13  | 
|  15 namespace content { |  14 namespace content { | 
|  16  |  15  | 
|  17 HistogramMessageFilter::HistogramMessageFilter() |  16 HistogramMessageFilter::HistogramMessageFilter() | 
|  18     : BrowserMessageFilter(ChildProcessMsgStart) {} |  17     : BrowserMessageFilter(ChildProcessMsgStart) {} | 
|  19  |  18  | 
|  20 bool HistogramMessageFilter::OnMessageReceived(const IPC::Message& message) { |  19 bool HistogramMessageFilter::OnMessageReceived(const IPC::Message& message) { | 
|  21   bool handled = true; |  20   bool handled = true; | 
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  55   base::HistogramBase* histogram = |  54   base::HistogramBase* histogram = | 
|  56       base::StatisticsRecorder::FindHistogram(name); |  55       base::StatisticsRecorder::FindHistogram(name); | 
|  57   if (!histogram) { |  56   if (!histogram) { | 
|  58     *histogram_json = "{}"; |  57     *histogram_json = "{}"; | 
|  59   } else { |  58   } else { | 
|  60     histogram->WriteJSON(histogram_json); |  59     histogram->WriteJSON(histogram_json); | 
|  61   } |  60   } | 
|  62 } |  61 } | 
|  63  |  62  | 
|  64 }  // namespace content |  63 }  // namespace content | 
| OLD | NEW |