Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Side by Side Diff: components/nacl/renderer/file_downloader.cc

Issue 909233002: Pepper: Always call status_cb in FileDownloader. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698