OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/download/download_interrupt_reasons_impl.h" | 5 #include "content/browser/download/download_interrupt_reasons_impl.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 | 8 |
9 namespace content { | 9 namespace content { |
10 | 10 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 return DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED; | 81 return DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED; |
82 default: | 82 default: |
83 break; | 83 break; |
84 } | 84 } |
85 | 85 |
86 NOTREACHED(); | 86 NOTREACHED(); |
87 | 87 |
88 return DOWNLOAD_INTERRUPT_REASON_NONE; | 88 return DOWNLOAD_INTERRUPT_REASON_NONE; |
89 } | 89 } |
90 | 90 |
91 std::string InterruptReasonDebugString(DownloadInterruptReason error) { | 91 std::string DownloadInterruptReasonToString(DownloadInterruptReason error) { |
92 | 92 |
93 #define INTERRUPT_REASON(name, value) \ | 93 #define INTERRUPT_REASON(name, value) \ |
94 case DOWNLOAD_INTERRUPT_REASON_##name: return #name; | 94 case DOWNLOAD_INTERRUPT_REASON_##name: return #name; |
95 | 95 |
96 switch (error) { | 96 switch (error) { |
97 INTERRUPT_REASON(NONE, 0) | 97 INTERRUPT_REASON(NONE, 0) |
98 | 98 |
99 #include "content/public/browser/download_interrupt_reason_values.h" | 99 #include "content/public/browser/download_interrupt_reason_values.h" |
100 | 100 |
101 default: | 101 default: |
102 break; | 102 break; |
103 } | 103 } |
104 | 104 |
105 #undef INTERRUPT_REASON | 105 #undef INTERRUPT_REASON |
106 | 106 |
107 return "Unknown error"; | 107 return "Unknown error"; |
108 } | 108 } |
109 | 109 |
110 } // namespace content | 110 } // namespace content |
OLD | NEW |