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

Unified Diff: chrome/browser/plugin_process_host.cc

Issue 6475011: Implemented policy to disable plugin finder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added the pref registration. Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/plugin_process_host.cc
diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc
index c15b030fe73a90f2f1abde444110659a7460211c..71f5679e6dcb0da1b527e08ef0570e1b194d99da 100644
--- a/chrome/browser/plugin_process_host.cc
+++ b/chrome/browser/plugin_process_host.cc
@@ -20,12 +20,14 @@
#include "base/path_service.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
+#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_thread.h"
#include "chrome/browser/child_process_security_policy.h"
#include "chrome/browser/chrome_plugin_browsing_context.h"
#include "chrome/browser/net/url_request_tracking.h"
#include "chrome/browser/plugin_download_helper.h"
#include "chrome/browser/plugin_service.h"
+#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/renderer_host/resource_dispatcher_host.h"
#include "chrome/browser/renderer_host/resource_message_filter.h"
@@ -35,6 +37,7 @@
#include "chrome/common/logging_chrome.h"
#include "chrome/common/net/url_request_context_getter.h"
#include "chrome/common/plugin_messages.h"
+#include "chrome/common/pref_names.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/render_messages_params.h"
#include "ipc/ipc_switches.h"
@@ -459,10 +462,15 @@ void PluginProcessHost::OnGetPluginFinderUrl(std::string* plugin_finder_url) {
NOTREACHED();
return;
}
-
- // TODO(iyengar) Add the plumbing to retrieve the default
- // plugin finder URL.
- *plugin_finder_url = kDefaultPluginFinderURL;
+ bool disable_finder = true;
+ // g_browser_process->local_state()->GetBoolean(prefs::kDisablePluginFinder);
+ if (!disable_finder) {
+ // TODO(iyengar) Add the plumbing to retrieve the default
+ // plugin finder URL.
+ *plugin_finder_url = kDefaultPluginFinderURL;
+ } else {
+ plugin_finder_url->clear();
+ }
}
void PluginProcessHost::OnPluginMessage(

Powered by Google App Engine
This is Rietveld 408576698