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