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

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: Created 4 years, 10 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 e3a84dbb31983c2873e3288249b7c06ad392f6e8..23f8344908b02ebbcd53dc1687892113fad69917 100644
--- a/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp
+++ b/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp
@@ -11,6 +11,7 @@
#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 {
@@ -19,11 +20,6 @@ namespace {
const char kTrialMetaTagName[] = "origin-trials";
-String getCurrentOrigin(ExecutionContext* executionContext)
-{
- return executionContext->securityOrigin()->toString();
-}
-
String getDisabledMessage(const String& featureName)
{
// TODO(chasej): Update message with URL to experiments site, when live
@@ -33,7 +29,7 @@ String getDisabledMessage(const String& featureName)
bool hasValidToken(ExecutionContext* executionContext, const String& featureName, String* errorMessage, WebTrialTokenValidator* validator)
{
bool foundAnyToken = false;
- String origin = getCurrentOrigin(executionContext);
+ WebSecurityOrigin origin(executionContext->securityOrigin());
// When in a document, the token is provided in a meta tag
if (executionContext->isDocument()) {

Powered by Google App Engine
This is Rietveld 408576698