Chromium Code Reviews| 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..e43fd15962b2ecb9d6d0533f4deb6b86d1e2da5e 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,13 @@ void WebServiceWorkerProviderImpl::getRegistrationForReady( |
| GetDispatcher()->GetRegistrationForReady(context_->provider_id(), callbacks); |
| } |
| +bool WebServiceWorkerProviderImpl::validateScopeAndScriptURL( |
| + const blink::WebURL& scope, |
| + const blink::WebURL& script_url) { |
| + return !ServiceWorkerUtils::ContainsDisallowedCharacter(scope, script_url, |
| + nullptr); |
|
nhiroki
2015/07/29 09:09:37
How about returning an error message provided by C
|
| +} |
| + |
| int WebServiceWorkerProviderImpl::provider_id() const { |
| return context_->provider_id(); |
| } |