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_registration_status.h" | 5 #include "content/browser/service_worker/service_worker_registration_status.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 | 9 |
10 namespace { | 10 namespace { |
(...skipping 10 matching lines...) Expand all Loading... |
21 blink::WebServiceWorkerError::ErrorType* error_type, | 21 blink::WebServiceWorkerError::ErrorType* error_type, |
22 base::string16* message) { | 22 base::string16* message) { |
23 switch (status) { | 23 switch (status) { |
24 case REGISTRATION_OK: | 24 case REGISTRATION_OK: |
25 NOTREACHED() << "Consumers should check registration status before " | 25 NOTREACHED() << "Consumers should check registration status before " |
26 "calling this function."; | 26 "calling this function."; |
27 return; | 27 return; |
28 | 28 |
29 case REGISTRATION_INSTALL_FAILED: | 29 case REGISTRATION_INSTALL_FAILED: |
30 *error_type = WebServiceWorkerError::InstallError; | 30 *error_type = WebServiceWorkerError::InstallError; |
31 *message = ASCIIToUTF16(kInstallFailedErrorMessage); | 31 *message = base::ASCIIToUTF16(kInstallFailedErrorMessage); |
32 return; | 32 return; |
33 | 33 |
34 case REGISTRATION_ACTIVATE_FAILED: | 34 case REGISTRATION_ACTIVATE_FAILED: |
35 *error_type = WebServiceWorkerError::ActivateError; | 35 *error_type = WebServiceWorkerError::ActivateError; |
36 *message = ASCIIToUTF16(kActivateFailedErrorMessage); | 36 *message = base::ASCIIToUTF16(kActivateFailedErrorMessage); |
37 return; | 37 return; |
38 } | 38 } |
39 NOTREACHED(); | 39 NOTREACHED(); |
40 } | 40 } |
41 } // namespace content | 41 } // namespace content |
OLD | NEW |