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

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: rebase Created 4 years, 10 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 102ed50dde1a31256f3db795b5e11d968e0e7986..015f0312840e26a7eb50a413669d78bc987ce6d3 100644
--- a/third_party/WebKit/Source/modules/cachestorage/Cache.cpp
+++ b/third_party/WebKit/Source/modules/cachestorage/Cache.cpp
@@ -22,6 +22,7 @@
#include "modules/fetch/Response.h"
#include "platform/HTTPNames.h"
#include "platform/Histogram.h"
+#include "platform/RuntimeEnabledFeatures.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"));
@@ -464,7 +465,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