Chromium Code Reviews| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 67 const int kPingTimeoutSeconds = 30; | 67 const int kPingTimeoutSeconds = 30; |
| 68 | 68 |
| 69 const char kClaimClientsStateErrorMesage[] = | 69 const char kClaimClientsStateErrorMesage[] = |
| 70 "Only the active worker can claim clients."; | 70 "Only the active worker can claim clients."; |
| 71 | 71 |
| 72 const char kClaimClientsShutdownErrorMesage[] = | 72 const char kClaimClientsShutdownErrorMesage[] = |
| 73 "Failed to claim clients due to Service Worker system shutdown."; | 73 "Failed to claim clients due to Service Worker system shutdown."; |
| 74 | 74 |
| 75 const char kNotRespondingErrorMesage[] = "Service Worker is not responding."; | 75 const char kNotRespondingErrorMesage[] = "Service Worker is not responding."; |
| 76 const char kForceUpdateInfoMessage[] = | 76 const char kForceUpdateInfoMessage[] = |
| 77 "Service Worker was updated because \"Update on load\" was " | 77 "Service Worker was updated because \"Update on reload\" was " |
| 78 "checked in DevTools Service Workers toolbar."; | 78 "checked in the DevTools Service Workers pane in the Application panel."; |
|
dgozman
2017/03/20 18:22:10
Let's keep it simpler:
"... in the DevTools Appli
| |
| 79 | 79 |
| 80 void RunSoon(const base::Closure& callback) { | 80 void RunSoon(const base::Closure& callback) { |
| 81 if (!callback.is_null()) | 81 if (!callback.is_null()) |
| 82 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, callback); | 82 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, callback); |
| 83 } | 83 } |
| 84 | 84 |
| 85 template <typename CallbackArray, typename Arg> | 85 template <typename CallbackArray, typename Arg> |
| 86 void RunCallbacks(ServiceWorkerVersion* version, | 86 void RunCallbacks(ServiceWorkerVersion* version, |
| 87 CallbackArray* callbacks_ptr, | 87 CallbackArray* callbacks_ptr, |
| 88 const Arg& arg) { | 88 const Arg& arg) { |
| (...skipping 1811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1900 | 1900 |
| 1901 void ServiceWorkerVersion::CleanUpExternalRequest( | 1901 void ServiceWorkerVersion::CleanUpExternalRequest( |
| 1902 const std::string& request_uuid, | 1902 const std::string& request_uuid, |
| 1903 ServiceWorkerStatusCode status) { | 1903 ServiceWorkerStatusCode status) { |
| 1904 if (status == SERVICE_WORKER_OK) | 1904 if (status == SERVICE_WORKER_OK) |
| 1905 return; | 1905 return; |
| 1906 external_request_uuid_to_request_id_.erase(request_uuid); | 1906 external_request_uuid_to_request_id_.erase(request_uuid); |
| 1907 } | 1907 } |
| 1908 | 1908 |
| 1909 } // namespace content | 1909 } // namespace content |
| OLD | NEW |