summaryrefslogtreecommitdiffstats
path: root/components/metrics/profiler/tracking_synchronizer_observer.h
blob: b9301bb268e4d0c97319916752f2d31dd231834e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_METRICS_PROFILER_TRACKING_SYNCHRONIZER_OBSERVER_H_
#define COMPONENTS_METRICS_PROFILER_TRACKING_SYNCHRONIZER_OBSERVER_H_

namespace tracked_objects {
struct ProcessDataSnapshot;
}

namespace metrics {

// Observer for notifications from the TrackingSynchronizer class.
class TrackingSynchronizerObserver {
 public:
  // Received |profiler_data| from a single process of |process_type|.
  // The observer should assume there might be more data coming until
  // |FinishedReceivingData()| is called.
  virtual void ReceivedProfilerData(
      const tracked_objects::ProcessDataSnapshot& profiler_data,
      int process_type) = 0;

  // The observer should not expect any more calls to |ReceivedProfilerData()|
  // (without re-registering).  This is sent either when data from all processes
  // has been gathered, or when the request times out.
  virtual void FinishedReceivingProfilerData() {}

 protected:
  TrackingSynchronizerObserver() {}
  virtual ~TrackingSynchronizerObserver() {}

 private:
  DISALLOW_COPY_AND_ASSIGN(TrackingSynchronizerObserver);
};

}  // namespace metrics

#endif  // COMPONENTS_METRICS_PROFILER_TRACKING_SYNCHRONIZER_OBSERVER_H_