summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-01 06:36:08 +0000
committerbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-01 06:36:08 +0000
commitcb166d4e3fd9069b548137983f1aae48d187b8ed (patch)
tree99f1dc826351f568c7f1ae0d094476c22306c859 /chrome
parent4b9b73693025ac28004c4e7bd388d510ac7613ea (diff)
downloadchromium_src-cb166d4e3fd9069b548137983f1aae48d187b8ed.zip
chromium_src-cb166d4e3fd9069b548137983f1aae48d187b8ed.tar.gz
chromium_src-cb166d4e3fd9069b548137983f1aae48d187b8ed.tar.bz2
Remove BrowserProcess::plugin_finder_disabled().
It's unused, as the policy is checked directly in PluginFinder (on the UI thread). BUG=none Review URL: https://chromiumcodereview.appspot.com/11347042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165302 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/browser_process.h4
-rw-r--r--chrome/browser/browser_process_impl.cc20
-rw-r--r--chrome/browser/browser_process_impl.h5
-rw-r--r--chrome/browser/plugins/plugin_finder.cc5
-rw-r--r--chrome/browser/plugins/plugin_finder.h3
-rw-r--r--chrome/browser/prefs/browser_prefs.cc2
-rw-r--r--chrome/test/base/testing_browser_process.cc4
-rw-r--r--chrome/test/base/testing_browser_process.h1
8 files changed, 12 insertions, 32 deletions
diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h
index 3691a11..6978471 100644
--- a/chrome/browser/browser_process.h
+++ b/chrome/browser/browser_process.h
@@ -174,10 +174,6 @@ class BrowserProcess {
virtual safe_browsing::ClientSideDetectionService*
safe_browsing_detection_service() = 0;
- // Returns the state of the disable plugin finder policy. Callable only on
- // the IO thread.
- virtual bool plugin_finder_disabled() const = 0;
-
#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
// This will start a timer that, if Chrome is in persistent mode, will check
// whether an update is available, and if that's the case, restart the
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 01da771..7cb72c1 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -610,13 +610,6 @@ safe_browsing::ClientSideDetectionService*
return NULL;
}
-bool BrowserProcessImpl::plugin_finder_disabled() const {
- if (plugin_finder_disabled_pref_.get())
- return plugin_finder_disabled_pref_->GetValue();
- else
- return false;
-}
-
void BrowserProcessImpl::Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
@@ -740,17 +733,8 @@ void BrowserProcessImpl::CreateLocalState() {
false);
pref_change_registrar_.Add(prefs::kDefaultBrowserSettingEnabled, this);
- // Initialize the preference for the plugin finder policy.
- // This preference is only needed on the IO thread so make it available there.
- local_state_->RegisterBooleanPref(prefs::kDisablePluginFinder, false);
- plugin_finder_disabled_pref_.reset(new BooleanPrefMember);
- plugin_finder_disabled_pref_->Init(prefs::kDisablePluginFinder,
- local_state_.get(), NULL);
- plugin_finder_disabled_pref_->MoveToThread(
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
-
- // Another policy that needs to be defined before the net subsystem is
- // initialized is MaxConnectionsPerProxy so we do it here.
+ // This policy needs to be defined before the net subsystem is initialized,
+ // so we do it here.
local_state_->RegisterIntegerPref(prefs::kMaxConnectionsPerProxy,
net::kDefaultMaxSocketsPerProxyServer);
int max_per_proxy = local_state_->GetInteger(prefs::kMaxConnectionsPerProxy);
diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_process_impl.h
index 45f6b35..304cd7a 100644
--- a/chrome/browser/browser_process_impl.h
+++ b/chrome/browser/browser_process_impl.h
@@ -19,7 +19,6 @@
#include "base/prefs/public/pref_change_registrar.h"
#include "base/threading/non_thread_safe.h"
#include "base/timer.h"
-#include "chrome/browser/api/prefs/pref_member.h"
#include "chrome/browser/browser_process.h"
#include "content/public/browser/notification_observer.h"
@@ -110,7 +109,6 @@ class BrowserProcessImpl : public BrowserProcess,
virtual SafeBrowsingService* safe_browsing_service() OVERRIDE;
virtual safe_browsing::ClientSideDetectionService*
safe_browsing_detection_service() OVERRIDE;
- virtual bool plugin_finder_disabled() const OVERRIDE;
#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
virtual void StartAutoupdateTimer() OVERRIDE;
@@ -252,9 +250,6 @@ class BrowserProcessImpl : public BrowserProcess,
scoped_ptr<ChromeResourceDispatcherHostDelegate>
resource_dispatcher_host_delegate_;
- // Monitors the state of the 'DisablePluginFinder' policy.
- scoped_ptr<BooleanPrefMember> plugin_finder_disabled_pref_;
-
#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
base::RepeatingTimer<BrowserProcessImpl> autoupdate_timer_;
diff --git a/chrome/browser/plugins/plugin_finder.cc b/chrome/browser/plugins/plugin_finder.cc
index 35e1759..ccb8f87 100644
--- a/chrome/browser/plugins/plugin_finder.cc
+++ b/chrome/browser/plugins/plugin_finder.cc
@@ -136,6 +136,11 @@ PluginMetadata* CreatePluginMetadata(
} // namespace
// static
+void PluginFinder::RegisterPrefs(PrefService* local_state) {
+ local_state->RegisterBooleanPref(prefs::kDisablePluginFinder, false);
+}
+
+// static
PluginFinder* PluginFinder::GetInstance() {
// PluginFinder::GetInstance() is the only method that's allowed to call
// Singleton<PluginFinder>::get().
diff --git a/chrome/browser/plugins/plugin_finder.h b/chrome/browser/plugins/plugin_finder.h
index fba6103..af9b6212 100644
--- a/chrome/browser/plugins/plugin_finder.h
+++ b/chrome/browser/plugins/plugin_finder.h
@@ -22,6 +22,7 @@ class DictionaryValue;
class GURL;
class PluginMetadata;
+class PrefService;
#if defined(ENABLE_PLUGIN_INSTALLATION)
class PluginInstaller;
@@ -32,6 +33,8 @@ class PluginInstaller;
// After that it can be safely used on any other thread.
class PluginFinder {
public:
+ static void RegisterPrefs(PrefService* local_state);
+
static PluginFinder* GetInstance();
// It should be called on the UI thread.
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 6de7afd..9e3c572 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -42,6 +42,7 @@
#include "chrome/browser/page_info_model.h"
#include "chrome/browser/password_manager/password_manager.h"
#include "chrome/browser/pepper_flash_settings_manager.h"
+#include "chrome/browser/plugins/plugin_finder.h"
#include "chrome/browser/prefs/incognito_mode_prefs.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/prefs/session_startup_pref.h"
@@ -152,6 +153,7 @@ void RegisterLocalState(PrefService* local_state) {
KeywordEditorController::RegisterPrefs(local_state);
MetricsLog::RegisterPrefs(local_state);
MetricsService::RegisterPrefs(local_state);
+ PluginFinder::RegisterPrefs(local_state);
PrefProxyConfigTrackerImpl::RegisterPrefs(local_state);
ProfileInfoCache::RegisterPrefs(local_state);
ProfileManager::RegisterPrefs(local_state);
diff --git a/chrome/test/base/testing_browser_process.cc b/chrome/test/base/testing_browser_process.cc
index 6ce3add..7bdd170 100644
--- a/chrome/test/base/testing_browser_process.cc
+++ b/chrome/test/base/testing_browser_process.cc
@@ -225,10 +225,6 @@ DownloadRequestLimiter* TestingBrowserProcess::download_request_limiter() {
return NULL;
}
-bool TestingBrowserProcess::plugin_finder_disabled() const {
- return false;
-}
-
ChromeNetLog* TestingBrowserProcess::net_log() {
return NULL;
}
diff --git a/chrome/test/base/testing_browser_process.h b/chrome/test/base/testing_browser_process.h
index 326014c..3f597bd 100644
--- a/chrome/test/base/testing_browser_process.h
+++ b/chrome/test/base/testing_browser_process.h
@@ -88,7 +88,6 @@ class TestingBrowserProcess : public BrowserProcess {
virtual void SetApplicationLocale(const std::string& app_locale) OVERRIDE;
virtual DownloadStatusUpdater* download_status_updater() OVERRIDE;
virtual DownloadRequestLimiter* download_request_limiter() OVERRIDE;
- virtual bool plugin_finder_disabled() const OVERRIDE;
#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
virtual void StartAutoupdateTimer() OVERRIDE {}