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

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: Fixed crash where writer_ was null 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
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_database.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 26ad9f4312b6e4361dfdae39331773202250bb6b..8c7d58eeaf44023bf5ae7cd2744e23b779ec030e 100644
--- a/content/browser/service_worker/service_worker_context_request_handler.cc
+++ b/content/browser/service_worker/service_worker_context_request_handler.cc
@@ -109,8 +109,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(
@@ -119,7 +119,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;
}
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698