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

Unified Diff: third_party/WebKit/Source/core/origin_trials/OriginTrialContext.h

Issue 1739163004: [Experimental Framework] Only log a console message for each feature once (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ef-state
Patch Set: Rebase Created 4 years, 9 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: third_party/WebKit/Source/core/origin_trials/OriginTrialContext.h
diff --git a/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.h b/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.h
index afe5771e7119449b22eaeafff0e0c1413552841f..044a7d8897743c20db8147641bc4238122ac3f9d 100644
--- a/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.h
+++ b/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.h
@@ -8,7 +8,9 @@
#include "core/CoreExport.h"
#include "platform/heap/Handle.h"
#include "wtf/Forward.h"
+#include "wtf/HashSet.h"
#include "wtf/Vector.h"
+#include "wtf/text/WTFString.h"
namespace blink {
@@ -56,6 +58,11 @@ private:
bool isFeatureEnabled(const String& featureName, String* errorMessage, WebTrialTokenValidator* = nullptr);
bool hasValidToken(Vector<String> tokens, const String& featureName, String* errorMessage, WebTrialTokenValidator*);
+
+ // Records whether an error message has been generated, for each feature
+ // name. Since these messages are generally written to the console, this is
+ // used to avoid cluttering the console with messages on every access.
+ HashSet<String> m_errorMessageGeneratedForFeature;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698