| 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 "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "content/child/child_thread.h" | 8 #include "content/child/child_thread.h" |
| 9 #include "content/child/npapi/webplugin.h" | 9 #include "content/child/npapi/webplugin.h" |
| 10 #include "content/child/npapi/plugin_host.h" | 10 #include "content/child/npapi/plugin_host.h" |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 } else { | 335 } else { |
| 336 plugin_stream_->DidReceiveData(data, data_length, offset); | 336 plugin_stream_->DidReceiveData(data, data_length, offset); |
| 337 } | 337 } |
| 338 // DANGER: this instance may be deleted at this point. | 338 // DANGER: this instance may be deleted at this point. |
| 339 } | 339 } |
| 340 } | 340 } |
| 341 | 341 |
| 342 void PluginURLFetcher::OnCompletedRequest( | 342 void PluginURLFetcher::OnCompletedRequest( |
| 343 int error_code, | 343 int error_code, |
| 344 bool was_ignored_by_handler, | 344 bool was_ignored_by_handler, |
| 345 bool stale_copy_in_cache, |
| 345 const std::string& security_info, | 346 const std::string& security_info, |
| 346 const base::TimeTicks& completion_time) { | 347 const base::TimeTicks& completion_time) { |
| 347 if (multipart_delegate_) { | 348 if (multipart_delegate_) { |
| 348 multipart_delegate_->OnCompletedRequest(); | 349 multipart_delegate_->OnCompletedRequest(); |
| 349 multipart_delegate_.reset(); | 350 multipart_delegate_.reset(); |
| 350 } | 351 } |
| 351 | 352 |
| 352 if (error_code == net::OK) { | 353 if (error_code == net::OK) { |
| 353 plugin_stream_->DidFinishLoading(resource_id_); | 354 plugin_stream_->DidFinishLoading(resource_id_); |
| 354 } else { | 355 } else { |
| 355 plugin_stream_->DidFail(resource_id_); | 356 plugin_stream_->DidFail(resource_id_); |
| 356 } | 357 } |
| 357 } | 358 } |
| 358 | 359 |
| 359 } // namespace content | 360 } // namespace content |
| OLD | NEW |