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

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

Issue 2959903002: Revert of Implement dumb URLLoader{Factory} for ServiceWorker script loading (Closed)
Patch Set: pull master and rebase Created 3 years, 6 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_version.cc
diff --git a/content/browser/service_worker/service_worker_version.cc b/content/browser/service_worker/service_worker_version.cc
index cf2c4e07580a5b3f983a919ac9acc8566caa1c62..c7fac32149dee12aa482657a72ffebe954546add 100644
--- a/content/browser/service_worker/service_worker_version.cc
+++ b/content/browser/service_worker/service_worker_version.cc
@@ -914,7 +914,14 @@ void ServiceWorkerVersion::OnDetached(EmbeddedWorkerStatus old_status) {
}
void ServiceWorkerVersion::OnScriptLoaded() {
- DCHECK(GetMainScriptHttpResponseInfo());
+ DCHECK(GetMainScriptHttpResponseInfo() ||
+ // TODO(scottmg|falken): This DCHECK is currently triggered in
+ // --network-service because ServiceWorkerReadFromCacheJob isn't being
+ // used to retrieve the service worker js. This should be removed once
+ // that's done.
+ (IsBrowserSideNavigationEnabled() &&
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableNetworkService)));
if (IsInstalled(status()))
UMA_HISTOGRAM_BOOLEAN("ServiceWorker.ScriptLoadSuccess", true);
}
« no previous file with comments | « content/browser/service_worker/service_worker_url_loader_job.cc ('k') | content/browser/storage_partition_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698