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 #include "content/browser/histogram_message_filter.h"
7 #include "base/process_util.h"
8 #include "content/browser/histogram_controller.h"
9 #include "content/browser/tcmalloc_internals_request_job.h"
10 #include "content/common/child_process_messages.h"
14 HistogramMessageFilter::HistogramMessageFilter() {}
16 void HistogramMessageFilter::OnChannelConnected(int32 peer_pid
) {
17 BrowserMessageFilter::OnChannelConnected(peer_pid
);
20 bool HistogramMessageFilter::OnMessageReceived(const IPC::Message
& message
,
21 bool* message_was_ok
) {
23 IPC_BEGIN_MESSAGE_MAP_EX(HistogramMessageFilter
, message
, *message_was_ok
)
24 IPC_MESSAGE_HANDLER(ChildProcessHostMsg_ChildHistogramData
,
26 IPC_MESSAGE_UNHANDLED(handled
= false)
27 IPC_END_MESSAGE_MAP_EX()
31 HistogramMessageFilter::~HistogramMessageFilter() {}
33 void HistogramMessageFilter::OnChildHistogramData(
35 const std::vector
<std::string
>& pickled_histograms
) {
36 HistogramController::GetInstance()->OnHistogramDataCollected(
37 sequence_number
, pickled_histograms
);