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

Unified Diff: base/metrics/histogram_base.h

Issue 141393002: Return a NULL histogram pointer on construction error (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add construction param to restore old CHECK for non-API calls Created 6 years, 11 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: base/metrics/histogram_base.h
diff --git a/base/metrics/histogram_base.h b/base/metrics/histogram_base.h
index 4248bd84a4c3136f6f2a1ee60483fa54e14ce2e9..bb563123abd2a71617bf603786739f9841094f57 100644
--- a/base/metrics/histogram_base.h
+++ b/base/metrics/histogram_base.h
@@ -79,6 +79,11 @@ class BASE_EXPORT HistogramBase {
NEVER_EXCEEDED_VALUE = 0x10
};
+ enum ConstructionBehavior {
+ kDoNotAllowBadConstruction = 0,
+ kAllowBadConstruction = 1
+ };
+
explicit HistogramBase(const std::string& name);
virtual ~HistogramBase();

Powered by Google App Engine
This is Rietveld 408576698