Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1627)

Unified Diff: chrome/browser/metrics/tracking_synchronizer_observer.h

Issue 10077001: [UMA] Use proper C++ objects to serialize tracked_objects across process boundaries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix yet another IWYU in the chromeos/ code... Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/metrics/tracking_synchronizer.cc ('k') | chrome/browser/resources/profiler/profiler.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/tracking_synchronizer_observer.h
diff --git a/chrome/browser/metrics/tracking_synchronizer_observer.h b/chrome/browser/metrics/tracking_synchronizer_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..50bfe15fe9c1bbaec4525b06441235e665900589
--- /dev/null
+++ b/chrome/browser/metrics/tracking_synchronizer_observer.h
@@ -0,0 +1,42 @@
+// 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 CHROME_BROWSER_METRICS_TRACKING_SYNCHRONIZER_OBSERVER_H_
+#define CHROME_BROWSER_METRICS_TRACKING_SYNCHRONIZER_OBSERVER_H_
+#pragma once
+
+#include "content/public/common/process_type.h"
+
+namespace tracked_objects {
+struct ProcessDataSnapshot;
+}
+
+namespace chrome_browser_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,
+ content::ProcessType 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 chrome_browser_metrics
+
+#endif // CHROME_BROWSER_METRICS_TRACKING_SYNCHRONIZER_OBSERVER_H_
« no previous file with comments | « chrome/browser/metrics/tracking_synchronizer.cc ('k') | chrome/browser/resources/profiler/profiler.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698