| Index: content/browser/service_worker/link_header_support.cc
|
| diff --git a/content/browser/service_worker/link_header_support.cc b/content/browser/service_worker/link_header_support.cc
|
| index 92b2d319eafdba855e6ea0cd19ca20345acdaa8b..fe9216ee14198494b23492b465f9929df92f2a88 100644
|
| --- a/content/browser/service_worker/link_header_support.cc
|
| +++ b/content/browser/service_worker/link_header_support.cc
|
| @@ -12,6 +12,7 @@
|
| #include "content/browser/loader/resource_request_info_impl.h"
|
| #include "content/browser/service_worker/service_worker_context_wrapper.h"
|
| #include "content/browser/service_worker/service_worker_request_handler.h"
|
| +#include "content/common/origin_trials/trial_token_validator.h"
|
| #include "content/common/service_worker/service_worker_utils.h"
|
| #include "content/public/browser/browser_thread.h"
|
| #include "content/public/browser/content_browser_client.h"
|
| @@ -20,6 +21,7 @@
|
| #include "content/public/common/origin_util.h"
|
| #include "net/http/http_util.h"
|
| #include "net/url_request/url_request.h"
|
| +#include "third_party/WebKit/public/platform/WebOriginTrialTokenStatus.h"
|
|
|
| namespace content {
|
|
|
| @@ -39,8 +41,9 @@ void HandleServiceWorkerLink(
|
| DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
|
|
| if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| - switches::kEnableExperimentalWebPlatformFeatures)) {
|
| - // TODO(mek): Integrate with experimental framework.
|
| + switches::kEnableExperimentalWebPlatformFeatures) &&
|
| + !TrialTokenValidator::RequestEnablesFeature(request, "ForeignFetch")) {
|
| + // TODO(mek): Log attempt to use without having correct token?
|
| return;
|
| }
|
|
|
|
|