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

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

Issue 280423005: Adds class ServiceWorkerScriptCacheMap and new ServiceWorkerVersion::Listener methods related to sc… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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_script_cache_map.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 cd6c200f718c6f3c864fec626548ab933a8648d1..2f7ee4ed4bc0d3a8834523432d3309727e85d9bc 100644
--- a/content/browser/service_worker/service_worker_context_request_handler.cc
+++ b/content/browser/service_worker/service_worker_context_request_handler.cc
@@ -60,7 +60,8 @@ bool ServiceWorkerContextRequestHandler::ShouldAddToScriptCache(
// happen prior to the initial eval completion.
if (version_->status() != ServiceWorkerVersion::NEW)
return false;
- return version_->LookupInScriptCache(url) == kInvalidServiceWorkerResponseId;
+ return version_->script_cache_map()->Lookup(url) ==
+ kInvalidServiceWorkerResponseId;
}
bool ServiceWorkerContextRequestHandler::ShouldReadFromScriptCache(
@@ -69,7 +70,7 @@ bool ServiceWorkerContextRequestHandler::ShouldReadFromScriptCache(
if (version_->status() == ServiceWorkerVersion::NEW ||
version_->status() == ServiceWorkerVersion::INSTALLING)
return false;
- *response_id_out = version_->LookupInScriptCache(url);
+ *response_id_out = version_->script_cache_map()->Lookup(url);
return *response_id_out != kInvalidServiceWorkerResponseId;
}
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_script_cache_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698