| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_internals_ui.h" | 5 #include "content/browser/service_worker/service_worker_internals_ui.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 case ServiceWorkerVersion::ACTIVATING: | 142 case ServiceWorkerVersion::ACTIVATING: |
| 143 info->SetString("status", "ACTIVATING"); | 143 info->SetString("status", "ACTIVATING"); |
| 144 break; | 144 break; |
| 145 case ServiceWorkerVersion::ACTIVATED: | 145 case ServiceWorkerVersion::ACTIVATED: |
| 146 info->SetString("status", "ACTIVATED"); | 146 info->SetString("status", "ACTIVATED"); |
| 147 break; | 147 break; |
| 148 case ServiceWorkerVersion::REDUNDANT: | 148 case ServiceWorkerVersion::REDUNDANT: |
| 149 info->SetString("status", "REDUNDANT"); | 149 info->SetString("status", "REDUNDANT"); |
| 150 break; | 150 break; |
| 151 } | 151 } |
| 152 |
| 153 switch (version.fetch_handler_existence) { |
| 154 case ServiceWorkerVersion::FetchHandlerExistence::UNKNOWN: |
| 155 info->SetString("fetch_handler_existence", "UNKNOWN"); |
| 156 break; |
| 157 case ServiceWorkerVersion::FetchHandlerExistence::EXISTS: |
| 158 info->SetString("fetch_handler_existence", "EXISTS"); |
| 159 break; |
| 160 case ServiceWorkerVersion::FetchHandlerExistence::DOES_NOT_EXIST: |
| 161 info->SetString("fetch_handler_existence", "DOES_NOT_EXIST"); |
| 162 break; |
| 163 } |
| 164 |
| 152 info->SetString("script_url", version.script_url.spec()); | 165 info->SetString("script_url", version.script_url.spec()); |
| 153 info->SetString("version_id", base::Int64ToString(version.version_id)); | 166 info->SetString("version_id", base::Int64ToString(version.version_id)); |
| 154 info->SetInteger("process_id", | 167 info->SetInteger("process_id", |
| 155 static_cast<int>(GetRealProcessId(version.process_id))); | 168 static_cast<int>(GetRealProcessId(version.process_id))); |
| 156 info->SetInteger("process_host_id", version.process_id); | 169 info->SetInteger("process_host_id", version.process_id); |
| 157 info->SetInteger("thread_id", version.thread_id); | 170 info->SetInteger("thread_id", version.thread_id); |
| 158 info->SetInteger("devtools_agent_route_id", version.devtools_agent_route_id); | 171 info->SetInteger("devtools_agent_route_id", version.devtools_agent_route_id); |
| 159 } | 172 } |
| 160 | 173 |
| 161 ListValue* GetRegistrationListValue( | 174 ListValue* GetRegistrationListValue( |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 callback.Run(SERVICE_WORKER_ERROR_ABORT); | 602 callback.Run(SERVICE_WORKER_ERROR_ABORT); |
| 590 return; | 603 return; |
| 591 } | 604 } |
| 592 | 605 |
| 593 // ServiceWorkerContextWrapper::UnregisterServiceWorker doesn't work here | 606 // ServiceWorkerContextWrapper::UnregisterServiceWorker doesn't work here |
| 594 // because that reduces a status code to boolean. | 607 // because that reduces a status code to boolean. |
| 595 context->context()->UnregisterServiceWorker(scope, callback); | 608 context->context()->UnregisterServiceWorker(scope, callback); |
| 596 } | 609 } |
| 597 | 610 |
| 598 } // namespace content | 611 } // namespace content |
| OLD | NEW |