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

Unified Diff: third_party/WebKit/public/platform/WebTrialTokenValidator.h

Issue 1635593004: Rename Experimental Framework classes and concepts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename RuntimeEnabledFeatures flag to experimental_feature_name Created 4 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: third_party/WebKit/public/platform/WebTrialTokenValidator.h
diff --git a/third_party/WebKit/public/platform/WebTrialTokenValidator.h b/third_party/WebKit/public/platform/WebTrialTokenValidator.h
new file mode 100644
index 0000000000000000000000000000000000000000..bd0e7aaddcfe77d700e075711fc85ef2189b7d6e
--- /dev/null
+++ b/third_party/WebKit/public/platform/WebTrialTokenValidator.h
@@ -0,0 +1,34 @@
+// Copyright 2016 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 WebTrialTokenValidator_h
+#define WebTrialTokenValidator_h
+
+#include "public/platform/WebCallbacks.h"
+#include "public/platform/WebString.h"
+
+namespace blink {
+
+// This interface abstracts the task of validating a token for an experimental
+// feature. Experimental features can be turned on and off at runtime for a
+// specific renderer, depending on the presence of a valid token in the
+// document's head. The details of determining whether a token is valid for a
chasej 2016/01/26 16:56:53 I'd suggest a more generic comment about where tok
iclelland 2016/01/26 19:05:49 Done.
+// particular feature is left up to the embedder. An implementation can
chasej 2016/01/26 16:56:53 Given that the token validation happens in the ren
iclelland 2016/01/26 19:05:49 ... it's unfortunate, perhaps, but true for the ti
+// effectively disable all origin trials by simply returning false in all cases.
+//
+// More documentation on the design of the experimental framework is at
+// https://docs.google.com/document/d/1qVP2CK1lbfmtIJRIm6nwuEFFhGhYbtThLQPo3CSTtmg
+
+class WebTrialTokenValidator {
+public:
+ virtual ~WebTrialTokenValidator() {}
+
+ // Returns true if the given token is valid for the specified origin and
+ // feature name.
+ virtual bool validateToken(const WebString& token, const WebString& origin, const WebString& featureName) = 0;
+};
+
+} // namespace blink
+
+#endif // WebTrialTokenValidator_h

Powered by Google App Engine
This is Rietveld 408576698