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

Side by Side Diff: content/browser/plugin_data_remover_impl.cc

Issue 12086077: Only permit plug-in loads in the browser if the plug-in isn't blocked or the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/plugin_data_remover_impl.h" 5 #include "content/browser/plugin_data_remover_impl.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 is_removing_ = true; 102 is_removing_ = true;
103 // Balanced in On[Ppapi]ChannelOpened or OnError. Exactly one them will 103 // Balanced in On[Ppapi]ChannelOpened or OnError. Exactly one them will
104 // eventually be called, so we need to keep this object around until then. 104 // eventually be called, so we need to keep this object around until then.
105 AddRef(); 105 AddRef();
106 106
107 PepperPluginInfo* pepper_info = 107 PepperPluginInfo* pepper_info =
108 plugin_service->GetRegisteredPpapiPluginInfo(plugin_path); 108 plugin_service->GetRegisteredPpapiPluginInfo(plugin_path);
109 if (pepper_info) { 109 if (pepper_info) {
110 plugin_name_ = pepper_info->name; 110 plugin_name_ = pepper_info->name;
111 // Use the broker since we run this function outside the sandbox. 111 // Use the broker since we run this function outside the sandbox.
112 plugin_service->OpenChannelToPpapiBroker(plugin_path, this); 112 plugin_service->OpenChannelToPpapiBroker(0, plugin_path, this);
113 } else { 113 } else {
114 plugin_service->OpenChannelToNpapiPlugin( 114 plugin_service->OpenChannelToNpapiPlugin(
115 0, 0, GURL(), GURL(), mime_type, this); 115 0, 0, GURL(), GURL(), mime_type, this);
116 } 116 }
117 } 117 }
118 118
119 // Called when a timeout happens in order not to block the client 119 // Called when a timeout happens in order not to block the client
120 // indefinitely. 120 // indefinitely.
121 void OnTimeout() { 121 void OnTimeout() {
122 LOG_IF(ERROR, is_removing_) << "Timed out"; 122 LOG_IF(ERROR, is_removing_) << "Timed out";
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 309
310 base::WaitableEvent* PluginDataRemoverImpl::StartRemoving( 310 base::WaitableEvent* PluginDataRemoverImpl::StartRemoving(
311 base::Time begin_time) { 311 base::Time begin_time) {
312 DCHECK(!context_.get()); 312 DCHECK(!context_.get());
313 context_ = new Context(begin_time, browser_context_); 313 context_ = new Context(begin_time, browser_context_);
314 context_->Init(mime_type_); 314 context_->Init(mime_type_);
315 return context_->event(); 315 return context_->event();
316 } 316 }
317 317
318 } // namespace content 318 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698