By moving the call to Load() up in SearchProvider::Start(), we are giving a chance...
[chromium-blink-merge.git] / content / browser / histogram_message_filter.cc
blob040ca95ae56da57cced2f092c548444dd131d3fd
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"
12 namespace content {
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) {
22 bool handled = true;
23 IPC_BEGIN_MESSAGE_MAP_EX(HistogramMessageFilter, message, *message_was_ok)
24 IPC_MESSAGE_HANDLER(ChildProcessHostMsg_ChildHistogramData,
25 OnChildHistogramData)
26 IPC_MESSAGE_UNHANDLED(handled = false)
27 IPC_END_MESSAGE_MAP_EX()
28 return handled;
31 HistogramMessageFilter::~HistogramMessageFilter() {}
33 void HistogramMessageFilter::OnChildHistogramData(
34 int sequence_number,
35 const std::vector<std::string>& pickled_histograms) {
36 HistogramController::GetInstance()->OnHistogramDataCollected(
37 sequence_number, pickled_histograms);