Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / content / browser / histogram_message_filter.h
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.
4
5 #ifndef CONTENT_BROWSER_HISTOGRAM_MESSAGE_FILTER_H_
6 #define CONTENT_BROWSER_HISTOGRAM_MESSAGE_FILTER_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "content/public/browser/browser_message_filter.h"
12 #include "content/public/common/process_type.h"
13
14 namespace content {
15
16 // This class sends and receives histogram messages in the browser process.
17 class HistogramMessageFilter : public BrowserMessageFilter {
18  public:
19   HistogramMessageFilter();
20
21   // BrowserMessageFilter implementation.
22   bool OnMessageReceived(const IPC::Message& message) override;
23
24  private:
25   ~HistogramMessageFilter() override;
26
27   // Message handlers.
28   void OnChildHistogramData(int sequence_number,
29                             const std::vector<std::string>& pickled_histograms);
30   void OnGetBrowserHistogram(const std::string& name,
31                              std::string* histogram_json);
32
33   DISALLOW_COPY_AND_ASSIGN(HistogramMessageFilter);
34 };
35
36 }  // namespace content
37
38 #endif  // CONTENT_BROWSER_HISTOGRAM_MESSAGE_FILTER_H_