Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: chrome/browser/renderer_host/buffered_resource_handler.cc

Issue 5699005: Policy: Re-enabled plugin still disabled (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Whitespace fixes only. Trybot happiness still applies. Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/plugin_updater.cc ('k') | chrome/browser/resources/plugins.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/plugin_updater.cc ('k') | chrome/browser/resources/plugins.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698