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 "components/nacl/renderer/file_downloader.h" | 5 #include "components/nacl/renderer/file_downloader.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "components/nacl/renderer/nexe_load_manager.h" | 8 #include "components/nacl/renderer/nexe_load_manager.h" |
9 #include "net/base/net_errors.h" | 9 #include "net/base/net_errors.h" |
10 #include "third_party/WebKit/public/platform/WebURLError.h" | 10 #include "third_party/WebKit/public/platform/WebURLError.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 switch (error.reason) { | 86 switch (error.reason) { |
87 case net::ERR_ACCESS_DENIED: | 87 case net::ERR_ACCESS_DENIED: |
88 case net::ERR_NETWORK_ACCESS_DENIED: | 88 case net::ERR_NETWORK_ACCESS_DENIED: |
89 status_ = ACCESS_DENIED; | 89 status_ = ACCESS_DENIED; |
90 break; | 90 break; |
91 } | 91 } |
92 } else { | 92 } else { |
93 // It's a WebKit error. | 93 // It's a WebKit error. |
94 status_ = ACCESS_DENIED; | 94 status_ = ACCESS_DENIED; |
95 } | 95 } |
| 96 |
| 97 // Delete url_loader to prevent didFinishLoading from being called, which |
| 98 // some implementations of blink::WebURLLoader will do after calling didFail. |
| 99 url_loader_.reset(); |
| 100 |
| 101 status_cb_.Run(status_, file_.Pass(), http_status_code_); |
| 102 delete this; |
96 } | 103 } |
97 | 104 |
98 } // namespace nacl | 105 } // namespace nacl |
OLD | NEW |