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

Unified Diff: content/public/browser/histogram_controller.h

Issue 10454086: Histograms - Support histograms for Plugins, GPU (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 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
Index: content/public/browser/histogram_controller.h
===================================================================
--- content/public/browser/histogram_controller.h (revision 0)
+++ content/public/browser/histogram_controller.h (working copy)
@@ -0,0 +1,50 @@
+// 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 CONTENT_PUBLIC_BROWSER_HISTOGRAM_CONTROLLER_H_
+#define CONTENT_PUBLIC_BROWSER_HISTOGRAM_CONTROLLER_H_
+
+#include <set>
+#include <string>
+
+#include "base/metrics/histogram.h"
+#include "content/common/content_export.h"
+
+
+namespace base {
+class DictionaryValue;
+}
+
+namespace content {
+
+class HistogramSubscriber;
+
+// HistogramController is used on the browser process to collect histogram data.
+// Only the browser UI thread is allowed to interact with the
+// HistogramController object.
+class CONTENT_EXPORT HistogramController {
+ public:
+ // Returns the HistogramController object for the current process, or NULL if
+ // none.
+ static HistogramController* GetInstance();
+
+ virtual ~HistogramController() {}
+
+ // Register the subscriber so that it will be called when for example
+ // OnHistogramDataCollected is returning histogram data from a child process.
+ // This is called on UI thread.
+ virtual void Register(HistogramSubscriber* subscriber) = 0;
+
+ // Unregister the subscriber so that it will not be called when for example
+ // OnHistogramDataCollected is returning histogram data from a child process.
+ // Safe to call even if caller is not the current subscriber.
+ virtual void Unregister(const HistogramSubscriber* subscriber) = 0;
+
+ // Contact all processes and get their histogram data.
+ virtual void GetHistogramData(int sequence_number) = 0;
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_HISTOGRAM_CONTROLLER_H_
Property changes on: content/public/browser/histogram_controller.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF

Powered by Google App Engine
This is Rietveld 408576698