| OLD | NEW |
| 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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 int64 offset = data_offset_; | 302 int64 offset = data_offset_; |
| 303 data_offset_ += data_length; | 303 data_offset_ += data_length; |
| 304 plugin_stream_->DidReceiveData(data, data_length, offset); | 304 plugin_stream_->DidReceiveData(data, data_length, offset); |
| 305 // DANGER: this instance may be deleted at this point. | 305 // DANGER: this instance may be deleted at this point. |
| 306 } | 306 } |
| 307 } | 307 } |
| 308 | 308 |
| 309 void PluginURLFetcher::OnCompletedRequest( | 309 void PluginURLFetcher::OnCompletedRequest( |
| 310 int error_code, | 310 int error_code, |
| 311 bool was_ignored_by_handler, | 311 bool was_ignored_by_handler, |
| 312 bool stale_copy_in_cache, |
| 312 const std::string& security_info, | 313 const std::string& security_info, |
| 313 const base::TimeTicks& completion_time) { | 314 const base::TimeTicks& completion_time) { |
| 314 if (multipart_delegate_) { | 315 if (multipart_delegate_) { |
| 315 multipart_delegate_->OnCompletedRequest(); | 316 multipart_delegate_->OnCompletedRequest(); |
| 316 multipart_delegate_.reset(); | 317 multipart_delegate_.reset(); |
| 317 } | 318 } |
| 318 | 319 |
| 319 if (error_code == net::OK) { | 320 if (error_code == net::OK) { |
| 320 plugin_stream_->DidFinishLoading(resource_id_); | 321 plugin_stream_->DidFinishLoading(resource_id_); |
| 321 } else { | 322 } else { |
| 322 plugin_stream_->DidFail(resource_id_); | 323 plugin_stream_->DidFail(resource_id_); |
| 323 } | 324 } |
| 324 } | 325 } |
| 325 | 326 |
| 326 } // namespace content | 327 } // namespace content |
| OLD | NEW |