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