Save errno for logging before potentially overwriting it.
[chromium-blink-merge.git] / content / public / browser / profiler_subscriber.h
blob102de1ae422178728d9d9cafcf60ffc27df90818
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_PUBLIC_BROWSER_PROFILER_SUBSCRIBER_H_
6 #define CONTENT_PUBLIC_BROWSER_PROFILER_SUBSCRIBER_H_
8 #include "content/common/content_export.h"
10 namespace tracked_objects {
11 struct ProcessDataSnapshot;
14 namespace content {
16 // Objects interested in receiving profiler data derive from ProfilerSubscriber.
17 class CONTENT_EXPORT ProfilerSubscriber {
18 public:
19 // Send number of pending processes to subscriber. |end| is set to true if it
20 // is the last time. This is called on the UI thread.
21 virtual void OnPendingProcesses(int sequence_number,
22 int pending_processes,
23 bool end) = 0;
25 // Send |profiler_data| back to subscriber.
26 // This is called on the UI thread.
27 virtual void OnProfilerDataCollected(
28 int sequence_number,
29 const tracked_objects::ProcessDataSnapshot& profiler_data,
30 int process_type) = 0;
32 protected:
33 virtual ~ProfilerSubscriber() {}
36 } // namespace content
38 #endif // CONTENT_PUBLIC_BROWSER_PROFILER_SUBSCRIBER_H_