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

Unified Diff: content/browser/service_worker/service_worker_context_request_handler.cc

Issue 647953003: Service Worker script sizes in database. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Created 6 years, 2 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: content/browser/service_worker/service_worker_context_request_handler.cc
diff --git a/content/browser/service_worker/service_worker_context_request_handler.cc b/content/browser/service_worker/service_worker_context_request_handler.cc
index 93bacd263cc9ce2ac5fd3526124114835cc1055d..c7b73a8e89ea3c1b61eef992f3e06eaf32fdb25c 100644
--- a/content/browser/service_worker/service_worker_context_request_handler.cc
+++ b/content/browser/service_worker/service_worker_context_request_handler.cc
@@ -107,8 +107,8 @@ bool ServiceWorkerContextRequestHandler::ShouldAddToScriptCache(
version_->status() != ServiceWorkerVersion::INSTALLING) {
return false;
}
- return version_->script_cache_map()->Lookup(url) ==
- kInvalidServiceWorkerResponseId;
+ return version_->script_cache_map()->LookupResourceId(url) ==
+ kInvalidServiceWorkerResponseId;
}
bool ServiceWorkerContextRequestHandler::ShouldReadFromScriptCache(
@@ -117,7 +117,7 @@ bool ServiceWorkerContextRequestHandler::ShouldReadFromScriptCache(
if (version_->status() == ServiceWorkerVersion::NEW ||
version_->status() == ServiceWorkerVersion::INSTALLING)
return false;
- *response_id_out = version_->script_cache_map()->Lookup(url);
+ *response_id_out = version_->script_cache_map()->LookupResourceId(url);
return *response_id_out != kInvalidServiceWorkerResponseId;
}

Powered by Google App Engine
This is Rietveld 408576698