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

Unified Diff: chrome/browser/renderer_host/plugin_info_message_filter_unittest.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, 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/renderer_host/plugin_info_message_filter_unittest.cc
===================================================================
--- chrome/browser/renderer_host/plugin_info_message_filter_unittest.cc (revision 180039)
+++ chrome/browser/renderer_host/plugin_info_message_filter_unittest.cc (working copy)
@@ -27,13 +27,16 @@
FakePluginServiceFilter() {}
virtual ~FakePluginServiceFilter() {}
- virtual bool ShouldUsePlugin(int render_process_id,
+ virtual bool IsPluginEnabled(int render_process_id,
int render_view_id,
const void* context,
const GURL& url,
const GURL& policy_url,
webkit::WebPluginInfo* plugin) OVERRIDE;
+ virtual bool CanLoadPlugin(int render_process_id,
+ const FilePath& path) OVERRIDE;
+
void set_plugin_enabled(const FilePath& plugin_path, bool enabled) {
plugin_state_[plugin_path] = enabled;
}
@@ -42,7 +45,7 @@
std::map<FilePath, bool> plugin_state_;
};
-bool FakePluginServiceFilter::ShouldUsePlugin(int render_process_id,
+bool FakePluginServiceFilter::IsPluginEnabled(int render_process_id,
int render_view_id,
const void* context,
const GURL& url,
@@ -56,6 +59,11 @@
return it->second;
}
+bool FakePluginServiceFilter::CanLoadPlugin(int render_process_id,
+ const FilePath& path) {
+ return true;
+}
+
} // namespace
class PluginInfoMessageFilterTest : public ::testing::Test {

Powered by Google App Engine
This is Rietveld 408576698