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

Unified Diff: third_party/WebKit/Source/modules/cachestorage/Cache.cpp

Issue 1578363009: CacheStorage: Add ignoreSearch option to cache.matchAll(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 4 years, 11 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/modules/cachestorage/Cache.cpp
diff --git a/third_party/WebKit/Source/modules/cachestorage/Cache.cpp b/third_party/WebKit/Source/modules/cachestorage/Cache.cpp
index da6297f0c32131a0289697eee49ed2d42591cb17..a96b5e901c47114fbcda053d3c87a6355c853947 100644
--- a/third_party/WebKit/Source/modules/cachestorage/Cache.cpp
+++ b/third_party/WebKit/Source/modules/cachestorage/Cache.cpp
@@ -21,6 +21,7 @@
#include "modules/fetch/Request.h"
#include "modules/fetch/Response.h"
#include "platform/HTTPNames.h"
+#include "platform/RuntimeEnabledFeatures.h"
#include "public/platform/Platform.h"
#include "public/platform/WebPassOwnPtr.h"
#include "public/platform/modules/serviceworker/WebServiceWorkerCache.h"
@@ -31,7 +32,7 @@ namespace {
void checkCacheQueryOptions(const CacheQueryOptions& options, ExecutionContext* context)
{
- if (options.ignoreSearch())
+ if (!RuntimeEnabledFeatures::cacheIgnoreSearchOptionEnabled() && 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"));
@@ -435,7 +436,7 @@ ScriptPromise Cache::keys(ScriptState* scriptState, const RequestInfo& request,
WebServiceWorkerCache::QueryParams Cache::toWebQueryParams(const CacheQueryOptions& options)
{
WebServiceWorkerCache::QueryParams webQueryParams;
- webQueryParams.ignoreSearch = options.ignoreSearch();
+ webQueryParams.ignoreSearch = options.ignoreSearch() && RuntimeEnabledFeatures::cacheIgnoreSearchOptionEnabled();
webQueryParams.ignoreMethod = options.ignoreMethod();
webQueryParams.ignoreVary = options.ignoreVary();
webQueryParams.cacheName = options.cacheName();

Powered by Google App Engine
This is Rietveld 408576698