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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_HISTOGRAM_MESSAGE_FILTER_H_
6 #define CONTENT_BROWSER_HISTOGRAM_MESSAGE_FILTER_H_
11 #include "content/public/browser/browser_message_filter.h"
12 #include "content/public/common/process_type.h"
16 // This class sends and receives histogram messages in the browser process.
17 class HistogramMessageFilter
: public BrowserMessageFilter
{
19 HistogramMessageFilter();
21 // BrowserMessageFilter implementation.
22 virtual void OnChannelConnected(int32 peer_pid
) OVERRIDE
;
24 // BrowserMessageFilter implementation.
25 virtual bool OnMessageReceived(const IPC::Message
& message
,
26 bool* message_was_ok
) OVERRIDE
;
29 virtual ~HistogramMessageFilter();
32 void OnChildHistogramData(int sequence_number
,
33 const std::vector
<std::string
>& pickled_histograms
);
34 void OnGetBrowserHistogram(const std::string
& name
,
35 std::string
* histogram_json
);
37 DISALLOW_COPY_AND_ASSIGN(HistogramMessageFilter
);
40 } // namespace content
42 #endif // CONTENT_BROWSER_HISTOGRAM_MESSAGE_FILTER_H_