| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/service_worker/service_worker_version.h" | 5 #include "content/browser/service_worker/service_worker_version.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 876 | 876 |
| 877 void ServiceWorkerVersion::OnDetached(EmbeddedWorkerStatus old_status) { | 877 void ServiceWorkerVersion::OnDetached(EmbeddedWorkerStatus old_status) { |
| 878 if (IsInstalled(status())) { | 878 if (IsInstalled(status())) { |
| 879 ServiceWorkerMetrics::RecordWorkerStopped( | 879 ServiceWorkerMetrics::RecordWorkerStopped( |
| 880 ServiceWorkerMetrics::StopStatus::DETACH_BY_REGISTRY); | 880 ServiceWorkerMetrics::StopStatus::DETACH_BY_REGISTRY); |
| 881 } | 881 } |
| 882 OnStoppedInternal(old_status); | 882 OnStoppedInternal(old_status); |
| 883 } | 883 } |
| 884 | 884 |
| 885 void ServiceWorkerVersion::OnScriptLoaded() { | 885 void ServiceWorkerVersion::OnScriptLoaded() { |
| 886 DCHECK(GetMainScriptHttpResponseInfo()); | 886 // DCHECK(GetMainScriptHttpResponseInfo()); |
| 887 if (IsInstalled(status())) | 887 if (IsInstalled(status())) |
| 888 UMA_HISTOGRAM_BOOLEAN("ServiceWorker.ScriptLoadSuccess", true); | 888 UMA_HISTOGRAM_BOOLEAN("ServiceWorker.ScriptLoadSuccess", true); |
| 889 } | 889 } |
| 890 | 890 |
| 891 void ServiceWorkerVersion::OnScriptLoadFailed() { | 891 void ServiceWorkerVersion::OnScriptLoadFailed() { |
| 892 if (IsInstalled(status())) | 892 if (IsInstalled(status())) |
| 893 UMA_HISTOGRAM_BOOLEAN("ServiceWorker.ScriptLoadSuccess", false); | 893 UMA_HISTOGRAM_BOOLEAN("ServiceWorker.ScriptLoadSuccess", false); |
| 894 } | 894 } |
| 895 | 895 |
| 896 void ServiceWorkerVersion::OnRegisteredToDevToolsManager() { | 896 void ServiceWorkerVersion::OnRegisteredToDevToolsManager() { |
| (...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1818 | 1818 |
| 1819 void ServiceWorkerVersion::CleanUpExternalRequest( | 1819 void ServiceWorkerVersion::CleanUpExternalRequest( |
| 1820 const std::string& request_uuid, | 1820 const std::string& request_uuid, |
| 1821 ServiceWorkerStatusCode status) { | 1821 ServiceWorkerStatusCode status) { |
| 1822 if (status == SERVICE_WORKER_OK) | 1822 if (status == SERVICE_WORKER_OK) |
| 1823 return; | 1823 return; |
| 1824 external_request_uuid_to_request_id_.erase(request_uuid); | 1824 external_request_uuid_to_request_id_.erase(request_uuid); |
| 1825 } | 1825 } |
| 1826 | 1826 |
| 1827 } // namespace content | 1827 } // namespace content |
| OLD | NEW |