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

Side by Side Diff: content/child/npapi/plugin_url_fetcher.cc

Issue 63643003: Fix not resuming a request after a plugin calls NPN_URLRedirectResponse. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/child/npapi/plugin_url_fetcher.h" 5 #include "content/child/npapi/plugin_url_fetcher.h"
6 6
7 #include "content/child/child_thread.h" 7 #include "content/child/child_thread.h"
8 #include "content/child/npapi/webplugin.h" 8 #include "content/child/npapi/webplugin.h"
9 #include "content/child/npapi/plugin_host.h" 9 #include "content/child/npapi/plugin_host.h"
10 #include "content/child/npapi/plugin_instance.h" 10 #include "content/child/npapi/plugin_instance.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 138
139 PluginURLFetcher::~PluginURLFetcher() { 139 PluginURLFetcher::~PluginURLFetcher() {
140 } 140 }
141 141
142 void PluginURLFetcher::Cancel() { 142 void PluginURLFetcher::Cancel() {
143 bridge_->Cancel(); 143 bridge_->Cancel();
144 } 144 }
145 145
146 void PluginURLFetcher::URLRedirectResponse(bool allow) { 146 void PluginURLFetcher::URLRedirectResponse(bool allow) {
147 if (allow) { 147 if (allow) {
148 bridge_->SetDefersLoading(true); 148 bridge_->SetDefersLoading(false);
scottmg 2013/11/07 04:48:55 this is the response to OnReceivedRedirect?
jam 2013/11/07 04:58:19 this is called by the plugin after we hit a redire
149 } else { 149 } else {
150 bridge_->Cancel(); 150 bridge_->Cancel();
151 plugin_stream_->DidFail(resource_id_); // That will delete |this|. 151 plugin_stream_->DidFail(resource_id_); // That will delete |this|.
152 } 152 }
153 } 153 }
154 154
155 void PluginURLFetcher::OnUploadProgress(uint64 position, uint64 size) { 155 void PluginURLFetcher::OnUploadProgress(uint64 position, uint64 size) {
156 } 156 }
157 157
158 bool PluginURLFetcher::OnReceivedRedirect( 158 bool PluginURLFetcher::OnReceivedRedirect(
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 } 317 }
318 318
319 if (error_code == net::OK) { 319 if (error_code == net::OK) {
320 plugin_stream_->DidFinishLoading(resource_id_); 320 plugin_stream_->DidFinishLoading(resource_id_);
321 } else { 321 } else {
322 plugin_stream_->DidFail(resource_id_); 322 plugin_stream_->DidFail(resource_id_);
323 } 323 }
324 } 324 }
325 325
326 } // namespace content 326 } // namespace content
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