Chromium Code Reviews| Index: Source/modules/cachestorage/CacheStorage.cpp |
| diff --git a/Source/modules/cachestorage/CacheStorage.cpp b/Source/modules/cachestorage/CacheStorage.cpp |
| index f6f4f0cf1280f7fe18b2dca35884369da1e59589..b366e2b137310a2e0f706d1b84eedec3c71ee130 100644 |
| --- a/Source/modules/cachestorage/CacheStorage.cpp |
| +++ b/Source/modules/cachestorage/CacheStorage.cpp |
| @@ -9,6 +9,7 @@ |
| #include "bindings/core/v8/ScriptState.h" |
| #include "core/dom/DOMException.h" |
| #include "core/dom/ExceptionCode.h" |
| +#include "core/inspector/ConsoleMessage.h" |
| #include "modules/cachestorage/CacheStorageError.h" |
| #include "modules/fetch/Request.h" |
| #include "modules/fetch/Response.h" |
| @@ -39,6 +40,16 @@ bool commonChecks(ScriptState* scriptState, ExceptionState& exceptionState) |
| return true; |
| } |
| +void checkCacheQueryOptions(ExecutionContext* context, const CacheQueryOptions& options) |
|
jkarlin
2015/08/27 11:29:15
switch argument order
nhiroki
2015/08/27 13:41:53
Done.
|
| +{ |
| + if (options.ignoreSearch()) |
| + context->addConsoleMessage(ConsoleMessage::create(JSMessageSource, WarningMessageLevel, "Cache.match() does not support 'ignoreSearch' option yet. See http://crbug.com/520784")); |
| + if (options.ignoreMethod()) |
| + context->addConsoleMessage(ConsoleMessage::create(JSMessageSource, WarningMessageLevel, "Cache.match() does not support 'ignoreMethod' option yet. See http://crbug.com/482256")); |
| + if (options.ignoreVary()) |
| + context->addConsoleMessage(ConsoleMessage::create(JSMessageSource, WarningMessageLevel, "Cache.match() does not support 'ignoreVary' option yet. See http://crbug.com/499216")); |
| +} |
| + |
| } |
| // FIXME: Consider using CallbackPromiseAdapter. |
| @@ -301,6 +312,7 @@ ScriptPromise CacheStorage::matchImpl(ScriptState* scriptState, const Request* r |
| { |
| WebServiceWorkerRequest webRequest; |
| request->populateWebServiceWorkerRequest(webRequest); |
| + checkCacheQueryOptions(scriptState->executionContext(), options); |
| ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState); |
| const ScriptPromise promise = resolver->promise(); |