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

Unified Diff: chrome/default_plugin/plugin_impl_win.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/default_plugin/plugin_impl_win.cc
diff --git a/chrome/default_plugin/plugin_impl_win.cc b/chrome/default_plugin/plugin_impl_win.cc
index cb767b0b51201562e951e53ab773e52340f8da1d..586264984d452aa91aa7045d81616021029bea75 100644
--- a/chrome/default_plugin/plugin_impl_win.cc
+++ b/chrome/default_plugin/plugin_impl_win.cc
@@ -38,7 +38,8 @@ PluginInstallerImpl::PluginInstallerImpl(int16 mode)
}
PluginInstallerImpl::~PluginInstallerImpl() {
- installation_job_monitor_thread_->Stop();
+ if (!disable_plugin_finder_)
+ installation_job_monitor_thread_->Stop();
if (bold_font_)
DeleteObject(bold_font_);
@@ -72,16 +73,23 @@ bool PluginInstallerImpl::Initialize(HINSTANCE module_handle, NPP instance,
return false;
}
- if (!installation_job_monitor_thread_->Initialize()) {
- DLOG(ERROR) << "Failed to initialize plugin install job";
- NOTREACHED();
- return false;
- }
+ if (plugin_finder_url_.empty())
+ disable_plugin_finder_ = true;
InitializeResources(module_handle);
- DisplayStatus(IDS_DEFAULT_PLUGIN_GET_PLUGIN_MSG_NO_PLUGIN_NAME);
- plugin_database_handler_.DownloadPluginsFileIfNeeded(plugin_finder_url_);
+ if (!disable_plugin_finder_) {
+ if (!installation_job_monitor_thread_->Initialize()) {
+ DLOG(ERROR) << "Failed to initialize plugin install job";
+ NOTREACHED();
+ return false;
+ }
+
+ DisplayStatus(IDS_DEFAULT_PLUGIN_GET_PLUGIN_MSG_NO_PLUGIN_NAME);
+ plugin_database_handler_.DownloadPluginsFileIfNeeded(plugin_finder_url_);
+ } else {
+ DisplayStatus(IDS_DEFAULT_PLUGIN_GET_PLUGIN_MSG_PLUGIN_FINDER_DISABLED);
+ }
return true;
}

Powered by Google App Engine
This is Rietveld 408576698