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

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

Issue 1752463002: Cleanup TrialToken in preparation of moving it to content/common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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.cpp
diff --git a/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp b/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp
index 6d9cc0f2ebea3175a26ab5a9bd746130bf6dc4a2..556a8c6e0799b90952c0250b2165540183fb8cd1 100644
--- a/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp
+++ b/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp
@@ -11,17 +11,13 @@
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/weborigin/SecurityOrigin.h"
#include "public/platform/Platform.h"
+#include "public/platform/WebSecurityOrigin.h"
#include "public/platform/WebTrialTokenValidator.h"
namespace blink {
namespace {
-String getCurrentOrigin(ExecutionContext* executionContext)
-{
- return executionContext->securityOrigin()->toString();
-}
-
String getDisabledMessage(const String& featureName)
{
// TODO(chasej): Update message with URL to experiments site, when live
@@ -74,7 +70,7 @@ bool OriginTrialContext::isFeatureEnabled(const String& featureName, String* err
bool OriginTrialContext::hasValidToken(Vector<String> tokens, const String& featureName, String* errorMessage, WebTrialTokenValidator* validator)
{
- String origin = getCurrentOrigin(executionContext());
+ WebSecurityOrigin origin(executionContext()->securityOrigin());
for (const String& token : tokens) {
// Check with the validator service to verify the signature.

Powered by Google App Engine
This is Rietveld 408576698