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

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

Issue 1840193006: Move token gathering into parser Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add file lost with git reset 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 6b9f0d7de5e3140a520ece8e357939880a778975..a1682ee4aa297be1e20f8b9235d0c5f70c63e66c 100644
--- a/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.h
+++ b/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.h
@@ -40,7 +40,7 @@ public:
virtual ~OriginTrialContext() = default;
virtual ExecutionContext* getExecutionContext() = 0;
- virtual Vector<String> getTokens() = 0;
+ virtual Vector<String> getTokens();
DECLARE_VIRTUAL_TRACE();
@@ -59,10 +59,17 @@ private:
bool hasValidToken(Vector<String> tokens, const String& featureName, String* errorMessage, WebTrialTokenValidator*);
+ void addToken(const String& token);
+ void finalizeTokens();
+ void resetOriginTrialsForTesting();
+
// 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;
+
+ bool m_finalized;
+ Vector<String> m_tokens;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698