| Index: content/child/npapi/plugin_url_fetcher.cc
|
| diff --git a/content/child/npapi/plugin_url_fetcher.cc b/content/child/npapi/plugin_url_fetcher.cc
|
| index 0776f213cbdf8925288c5e5bfbc6104018df504d..003eab691c48914ff533a022c4e040e650e89a9f 100644
|
| --- a/content/child/npapi/plugin_url_fetcher.cc
|
| +++ b/content/child/npapi/plugin_url_fetcher.cc
|
| @@ -24,7 +24,6 @@
|
| #include "third_party/WebKit/public/platform/WebURLLoaderClient.h"
|
| #include "third_party/WebKit/public/platform/WebURLResponse.h"
|
| #include "webkit/child/multipart_response_delegate.h"
|
| -#include "webkit/child/resource_loader_bridge.h"
|
| #include "webkit/common/resource_response_info.h"
|
|
|
| namespace content {
|
| @@ -103,7 +102,8 @@ PluginURLFetcher::PluginURLFetcher(PluginStreamUrl* plugin_stream,
|
| resource_id_(resource_id),
|
| copy_stream_data_(copy_stream_data),
|
| data_offset_(0),
|
| - pending_failure_notification_(false) {
|
| + pending_failure_notification_(false),
|
| + dispatcher_(NULL) {
|
| RequestInfo request_info;
|
| request_info.method = method;
|
| request_info.url = url;
|
| @@ -143,16 +143,15 @@ PluginURLFetcher::PluginURLFetcher(PluginStreamUrl* plugin_stream,
|
| request_info.headers = std::string("Range: ") + range;
|
| }
|
|
|
| - bridge_.reset(ChildThread::current()->resource_dispatcher()->CreateBridge(
|
| - request_info));
|
| + dispatcher_ = ChildThread::current()->resource_dispatcher();
|
| + dispatcher_->CreateBridge(request_info);
|
| if (!body.empty()) {
|
| - scoped_refptr<ResourceRequestBody> request_body =
|
| - new ResourceRequestBody;
|
| + scoped_refptr<ResourceRequestBody> request_body = new ResourceRequestBody;
|
| request_body->AppendBytes(&body[0], body.size());
|
| - bridge_->SetRequestBody(request_body.get());
|
| + dispatcher_->SetRequestBody(request_body.get());
|
| }
|
|
|
| - bridge_->Start(this);
|
| + dispatcher_->Start(this);
|
|
|
| // TODO(jam): range requests
|
| }
|
| @@ -161,14 +160,14 @@ PluginURLFetcher::~PluginURLFetcher() {
|
| }
|
|
|
| void PluginURLFetcher::Cancel() {
|
| - bridge_->Cancel();
|
| + dispatcher_->Cancel();
|
| }
|
|
|
| void PluginURLFetcher::URLRedirectResponse(bool allow) {
|
| if (allow) {
|
| - bridge_->SetDefersLoading(false);
|
| + dispatcher_->SetDefersLoading(false);
|
| } else {
|
| - bridge_->Cancel();
|
| + dispatcher_->Cancel();
|
| plugin_stream_->DidFail(resource_id_); // That will delete |this|.
|
| }
|
| }
|
| @@ -216,7 +215,7 @@ bool PluginURLFetcher::OnReceivedRedirect(
|
| }
|
| } else {
|
| // Pause the request while we ask the plugin what to do about the redirect.
|
| - bridge_->SetDefersLoading(true);
|
| + dispatcher_->SetDefersLoading(true);
|
| plugin_stream_->WillSendRequest(url_, response_code);
|
| }
|
|
|
|
|