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

Unified Diff: chrome/browser/io_thread.cc

Issue 11741003: Remove PrefServiceSimple, replacing it with PrefService and PrefRegistrySimple. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to review comments. 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/io_thread.cc
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index 6bfbfcb8f76caa0f19a1bd47be15a72bebd75659..fe92c89fc4b6f84cc94a74ad33d1d0293fe551af 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -35,6 +35,7 @@
#include "chrome/browser/net/sdch_dictionary_fetcher.h"
#include "chrome/browser/net/spdyproxy/http_auth_handler_spdyproxy.h"
#include "chrome/browser/policy/policy_service.h"
+#include "chrome/browser/prefs/pref_registry_simple.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
@@ -357,7 +358,7 @@ IOThread::Globals::~Globals() {}
// |local_state| is passed in explicitly in order to (1) reduce implicit
// dependencies and (2) make IOThread more flexible for testing.
IOThread::IOThread(
- PrefServiceSimple* local_state,
+ PrefService* local_state,
policy::PolicyService* policy_service,
ChromeNetLog* net_log,
extensions::EventRouterForwarder* extension_event_router_forwarder)
@@ -372,7 +373,9 @@ IOThread::IOThread(
//
// TODO(joi): See if we can fix so it does get registered from
// browser_prefs::RegisterLocalState.
- RegisterPrefs(local_state);
+ PrefRegistrySimple* registry = static_cast<PrefRegistrySimple*>(
+ local_state->DeprecatedGetPrefRegistry());
+ RegisterPrefs(registry);
auth_schemes_ = local_state->GetString(prefs::kAuthSchemes);
negotiate_disable_cname_lookup_ = local_state->GetBoolean(
prefs::kDisableAuthNegotiateCnameLookup);
@@ -726,7 +729,7 @@ void IOThread::EnableSpdy(const std::string& mode) {
}
// static
-void IOThread::RegisterPrefs(PrefServiceSimple* local_state) {
+void IOThread::RegisterPrefs(PrefRegistrySimple* local_state) {
local_state->RegisterStringPref(prefs::kAuthSchemes,
"basic,digest,ntlm,negotiate,"
"spdyproxy");

Powered by Google App Engine
This is Rietveld 408576698