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

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

Issue 2309793002: Use modified URLRequest::Read() and delegate methods in /service_worker/ (Closed)
Patch Set: nits Created 4 years, 3 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_script_cache_map.cc
diff --git a/content/browser/service_worker/service_worker_script_cache_map.cc b/content/browser/service_worker/service_worker_script_cache_map.cc
index 74f651a78b60d37e6715595c99120af2c9e4acf7..ac1ad78a270b15d1b5e9a4baac337af93aedc4c7 100644
--- a/content/browser/service_worker/service_worker_script_cache_map.cc
+++ b/content/browser/service_worker/service_worker_script_cache_map.cc
@@ -47,19 +47,20 @@ void ServiceWorkerScriptCacheMap::NotifyStartedCaching(const GURL& url,
void ServiceWorkerScriptCacheMap::NotifyFinishedCaching(
const GURL& url,
int64_t size_bytes,
- const net::URLRequestStatus& status,
+ net::Error net_error,
const std::string& status_message) {
DCHECK_NE(kInvalidServiceWorkerResourceId, LookupResourceId(url));
+ DCHECK_NE(net::ERR_IO_PENDING, net_error);
DCHECK(owner_->status() == ServiceWorkerVersion::NEW ||
owner_->status() == ServiceWorkerVersion::INSTALLING ||
owner_->status() == ServiceWorkerVersion::REDUNDANT);
if (!context_)
return; // Our storage has been wiped via DeleteAndStartOver.
- if (!status.is_success()) {
+ if (net_error != net::OK) {
context_->storage()->DoomUncommittedResource(LookupResourceId(url));
resource_map_.erase(url);
if (owner_->script_url() == url) {
- main_script_status_ = status;
+ main_script_status_ = net::URLRequestStatus::FromError(net_error);
main_script_status_message_ = status_message;
}
} else {

Powered by Google App Engine
This is Rietveld 408576698