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

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

Issue 24514003: Make BrowserMessageFilter not derive from IPC::ChannelProxy::MessageFilter. This allows us to hide … (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 7 years, 2 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 "content/browser/histogram_controller.h" 10 #include "content/browser/histogram_controller.h"
11 #include "content/browser/tcmalloc_internals_request_job.h" 11 #include "content/browser/tcmalloc_internals_request_job.h"
12 #include "content/common/child_process_messages.h" 12 #include "content/common/child_process_messages.h"
13 #include "content/public/common/content_switches.h" 13 #include "content/public/common/content_switches.h"
14 14
15 namespace content { 15 namespace content {
16 16
17 HistogramMessageFilter::HistogramMessageFilter() {} 17 HistogramMessageFilter::HistogramMessageFilter() {}
18 18
19 void HistogramMessageFilter::OnChannelConnected(int32 peer_pid) {
20 BrowserMessageFilter::OnChannelConnected(peer_pid);
21 }
22
23 bool HistogramMessageFilter::OnMessageReceived(const IPC::Message& message, 19 bool HistogramMessageFilter::OnMessageReceived(const IPC::Message& message,
24 bool* message_was_ok) { 20 bool* message_was_ok) {
25 bool handled = true; 21 bool handled = true;
26 IPC_BEGIN_MESSAGE_MAP_EX(HistogramMessageFilter, message, *message_was_ok) 22 IPC_BEGIN_MESSAGE_MAP_EX(HistogramMessageFilter, message, *message_was_ok)
27 IPC_MESSAGE_HANDLER(ChildProcessHostMsg_ChildHistogramData, 23 IPC_MESSAGE_HANDLER(ChildProcessHostMsg_ChildHistogramData,
28 OnChildHistogramData) 24 OnChildHistogramData)
29 IPC_MESSAGE_HANDLER(ChildProcessHostMsg_GetBrowserHistogram, 25 IPC_MESSAGE_HANDLER(ChildProcessHostMsg_GetBrowserHistogram,
30 OnGetBrowserHistogram) 26 OnGetBrowserHistogram)
31 IPC_MESSAGE_UNHANDLED(handled = false) 27 IPC_MESSAGE_UNHANDLED(handled = false)
32 IPC_END_MESSAGE_MAP_EX() 28 IPC_END_MESSAGE_MAP_EX()
(...skipping 26 matching lines...) Expand all
59 base::HistogramBase* histogram = 55 base::HistogramBase* histogram =
60 base::StatisticsRecorder::FindHistogram(name); 56 base::StatisticsRecorder::FindHistogram(name);
61 if (!histogram) { 57 if (!histogram) {
62 *histogram_json = "{}"; 58 *histogram_json = "{}";
63 } else { 59 } else {
64 histogram->WriteJSON(histogram_json); 60 histogram->WriteJSON(histogram_json);
65 } 61 }
66 } 62 }
67 63
68 } // namespace content 64 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/histogram_message_filter.h ('k') | content/browser/indexed_db/indexed_db_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698