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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
77 case net::ERR_BLOCKED_BY_CLIENT: | 77 case net::ERR_BLOCKED_BY_CLIENT: |
78 return DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED; | 78 return DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED; |
79 | 79 |
80 // Network errors. | 80 // Network errors. |
81 | 81 |
82 // The network operation timed out. | 82 // The network operation timed out. |
83 case net::ERR_TIMED_OUT: | 83 case net::ERR_TIMED_OUT: |
84 return DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT; | 84 return DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT; |
85 | 85 |
86 // The network connection has been lost. | 86 // The network connection has been lost. |
87 case net::ERR_NETWORK_CHANGED: | |
svaldez
2016/01/13 17:29:18
Might want to split this out to a separate CL if t
asanka
2016/01/28 02:24:17
Makes sense. Done.
| |
87 case net::ERR_INTERNET_DISCONNECTED: | 88 case net::ERR_INTERNET_DISCONNECTED: |
88 return DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED; | 89 return DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED; |
89 | 90 |
90 // The server has gone down. | 91 // The server has gone down. |
91 case net::ERR_CONNECTION_FAILED: | 92 case net::ERR_CONNECTION_FAILED: |
92 return DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN; | 93 return DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN; |
93 | 94 |
94 // Server responses. | 95 // Server responses. |
95 | 96 |
96 // The server does not support range requests. | 97 // The server does not support range requests. |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
130 default: | 131 default: |
131 break; | 132 break; |
132 } | 133 } |
133 | 134 |
134 #undef INTERRUPT_REASON | 135 #undef INTERRUPT_REASON |
135 | 136 |
136 return "Unknown error"; | 137 return "Unknown error"; |
137 } | 138 } |
138 | 139 |
139 } // namespace content | 140 } // namespace content |
OLD | NEW |