| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/renderer_host/buffered_resource_handler.h" | 5 #include "chrome/browser/renderer_host/buffered_resource_handler.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/histogram.h" | 9 #include "base/histogram.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 return true; | 425 return true; |
| 426 } | 426 } |
| 427 } else { | 427 } else { |
| 428 DCHECK(NPAPI::PluginList::Singleton()->PluginsLoaded()); | 428 DCHECK(NPAPI::PluginList::Singleton()->PluginsLoaded()); |
| 429 } | 429 } |
| 430 | 430 |
| 431 // Finally, check the plugin list. | 431 // Finally, check the plugin list. |
| 432 WebPluginInfo info; | 432 WebPluginInfo info; |
| 433 bool allow_wildcard = false; | 433 bool allow_wildcard = false; |
| 434 return !NPAPI::PluginList::Singleton()->GetPluginInfo( | 434 return !NPAPI::PluginList::Singleton()->GetPluginInfo( |
| 435 GURL(), type, allow_wildcard, &info, NULL); | 435 GURL(), type, allow_wildcard, &info, NULL) || !info.enabled; |
| 436 } | 436 } |
| 437 | 437 |
| 438 void BufferedResourceHandler::UseAlternateResourceHandler( | 438 void BufferedResourceHandler::UseAlternateResourceHandler( |
| 439 int request_id, | 439 int request_id, |
| 440 ResourceHandler* handler) { | 440 ResourceHandler* handler) { |
| 441 ResourceDispatcherHostRequestInfo* info = | 441 ResourceDispatcherHostRequestInfo* info = |
| 442 ResourceDispatcherHost::InfoForRequest(request_); | 442 ResourceDispatcherHost::InfoForRequest(request_); |
| 443 if (bytes_read_) { | 443 if (bytes_read_) { |
| 444 // A Read has already occured and we need to copy the data into the new | 444 // A Read has already occured and we need to copy the data into the new |
| 445 // ResourceHandler. | 445 // ResourceHandler. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 wait_for_plugins_ = false; | 479 wait_for_plugins_ = false; |
| 480 if (!request_) | 480 if (!request_) |
| 481 return; | 481 return; |
| 482 | 482 |
| 483 ResourceDispatcherHostRequestInfo* info = | 483 ResourceDispatcherHostRequestInfo* info = |
| 484 ResourceDispatcherHost::InfoForRequest(request_); | 484 ResourceDispatcherHost::InfoForRequest(request_); |
| 485 host_->PauseRequest(info->child_id(), info->request_id(), false); | 485 host_->PauseRequest(info->child_id(), info->request_id(), false); |
| 486 if (!CompleteResponseStarted(info->request_id(), false)) | 486 if (!CompleteResponseStarted(info->request_id(), false)) |
| 487 host_->CancelRequest(info->child_id(), info->request_id(), false); | 487 host_->CancelRequest(info->child_id(), info->request_id(), false); |
| 488 } | 488 } |
| OLD | NEW |