By moving the call to Load() up in SearchProvider::Start(), we are giving a chance...
[chromium-blink-merge.git] / content / browser / profiler_message_filter.h
blob99d7327d0132cc97985600a4213694e422e32c42
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_PROFILER_MESSAGE_FILTER_H_
6 #define CONTENT_BROWSER_PROFILER_MESSAGE_FILTER_H_
8 #include <string>
10 #include "content/public/browser/browser_message_filter.h"
11 #include "content/public/common/process_type.h"
13 namespace tracked_objects {
14 struct ProcessDataSnapshot;
17 namespace content {
19 // This class sends and receives profiler messages in the browser process.
20 class ProfilerMessageFilter : public BrowserMessageFilter {
21 public:
22 explicit ProfilerMessageFilter(ProcessType process_type);
24 // BrowserMessageFilter implementation.
25 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE;
27 // BrowserMessageFilter implementation.
28 virtual bool OnMessageReceived(const IPC::Message& message,
29 bool* message_was_ok) OVERRIDE;
31 protected:
32 virtual ~ProfilerMessageFilter();
34 private:
35 // Message handlers.
36 void OnChildProfilerData(
37 int sequence_number,
38 const tracked_objects::ProcessDataSnapshot& profiler_data);
40 #if defined(USE_TCMALLOC)
41 void OnTcmallocStats(const std::string& output);
42 #endif
44 ProcessType process_type_;
46 DISALLOW_COPY_AND_ASSIGN(ProfilerMessageFilter);
49 } // namespace content
51 #endif // CONTENT_BROWSER_PROFILER_MESSAGE_FILTER_H_