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

Unified Diff: base/metrics/histogram_base.h

Issue 1002103004: NOT FOR REVIEW - Slow Reports Reference Implementation Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: JSON serialization. Created 5 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
« no previous file with comments | « base/metrics/histogram.cc ('k') | base/metrics/histogram_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/histogram_base.h
diff --git a/base/metrics/histogram_base.h b/base/metrics/histogram_base.h
index c24df248112cc5fd99d339278f1c8c3404239891..4a51b5535aa12fb5506f477f3b939aaf80fbbc47 100644
--- a/base/metrics/histogram_base.h
+++ b/base/metrics/histogram_base.h
@@ -13,6 +13,7 @@
#include "base/atomicops.h"
#include "base/base_export.h"
#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string_piece.h"
#include "base/time/time.h"
@@ -145,6 +146,9 @@ class BASE_EXPORT HistogramBase {
// customize the output.
void WriteJSON(std::string* output) const;
+ typedef base::Callback<void(void)> ModifiedCallback;
+ void SetCallback(const ModifiedCallback&);
+
protected:
// Subclasses should implement this function to make SerializeInfo work.
virtual bool SerializeInfoImpl(Pickle* pickle) const = 0;
@@ -173,6 +177,8 @@ class BASE_EXPORT HistogramBase {
double scaled_sum,
std::string* output) const;
+ ModifiedCallback callback_;
+
private:
const std::string histogram_name_;
int32_t flags_;
« no previous file with comments | « base/metrics/histogram.cc ('k') | base/metrics/histogram_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698