Chromium Code Reviews| 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 cb79637f758036a12b2f217f3197150e7b74f4aa..1a812b201f314583a69a9a12f2f05b587b6a0457 100644 |
| --- a/content/browser/service_worker/service_worker_version.cc |
| +++ b/content/browser/service_worker/service_worker_version.cc |
| @@ -42,6 +42,7 @@ |
| #include "content/public/browser/browser_thread.h" |
| #include "content/public/browser/content_browser_client.h" |
| #include "content/public/browser/render_process_host.h" |
| +#include "content/public/common/browser_side_navigation_policy.h" |
| #include "content/public/common/content_client.h" |
| #include "content/public/common/content_switches.h" |
| #include "content/public/common/result_codes.h" |
| @@ -903,7 +904,13 @@ 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 subresources haven't been implemented yet. |
|
falken
2017/06/06 13:20:23
In the non-servicifiied path, ServiceWorkerReadFr
scottmg
2017/06/06 16:50:09
I see. OK, I updated the comment. I think I got co
|
| + // This should be removed once that is complete. |
| + (IsBrowserSideNavigationEnabled() && |
| + base::CommandLine::ForCurrentProcess()->HasSwitch( |
| + switches::kEnableNetworkService))); |
| if (IsInstalled(status())) |
| UMA_HISTOGRAM_BOOLEAN("ServiceWorker.ScriptLoadSuccess", true); |
| } |