| Index: content/child/service_worker/web_service_worker_provider_impl.cc
|
| diff --git a/content/child/service_worker/web_service_worker_provider_impl.cc b/content/child/service_worker/web_service_worker_provider_impl.cc
|
| index 154dfe0281aae8a717387ef8bd2dd79bc7e73ee0..a0472cced16526aeeb1a93de8c8f1a2eda3d7aac 100644
|
| --- a/content/child/service_worker/web_service_worker_provider_impl.cc
|
| +++ b/content/child/service_worker/web_service_worker_provider_impl.cc
|
| @@ -9,6 +9,7 @@
|
| #include "content/child/service_worker/service_worker_provider_context.h"
|
| #include "content/child/service_worker/web_service_worker_impl.h"
|
| #include "content/child/thread_safe_sender.h"
|
| +#include "content/common/service_worker/service_worker_utils.h"
|
| #include "third_party/WebKit/public/platform/WebServiceWorkerProviderClient.h"
|
| #include "third_party/WebKit/public/platform/WebURL.h"
|
|
|
| @@ -76,6 +77,18 @@ void WebServiceWorkerProviderImpl::getRegistrationForReady(
|
| GetDispatcher()->GetRegistrationForReady(context_->provider_id(), callbacks);
|
| }
|
|
|
| +bool WebServiceWorkerProviderImpl::validateScopeAndScriptURL(
|
| + const blink::WebURL& scope,
|
| + const blink::WebURL& script_url,
|
| + blink::WebString* error_message) {
|
| + std::string error;
|
| + bool has_error = ServiceWorkerUtils::ContainsDisallowedCharacter(
|
| + scope, script_url, &error);
|
| + if (has_error)
|
| + *error_message = blink::WebString::fromUTF8(error);
|
| + return !has_error;
|
| +}
|
| +
|
| int WebServiceWorkerProviderImpl::provider_id() const {
|
| return context_->provider_id();
|
| }
|
|
|