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

Unified Diff: base/prefs/pref_service.cc

Issue 12330008: Get rid of the ability to unregister preferences. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head for commit. Created 7 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
« no previous file with comments | « base/prefs/pref_service.h ('k') | chrome/browser/chromeos/login/oauth2_login_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/prefs/pref_service.cc
diff --git a/base/prefs/pref_service.cc b/base/prefs/pref_service.cc
index 04daed48b2096695af3b14558e54d0bc95cbde18..457778f37e4aafb1331484b01ad45e10c146b072 100644
--- a/base/prefs/pref_service.cc
+++ b/base/prefs/pref_service.cc
@@ -58,9 +58,6 @@ PrefService::PrefService(
pref_registry_->SetRegistrationCallback(
base::Bind(&PrefService::AddRegisteredPreference,
base::Unretained(this)));
- pref_registry_->SetUnregistrationCallback(
- base::Bind(&PrefService::RemoveRegisteredPreference,
- base::Unretained(this)));
AddInitialPreferences();
InitFromStorage(async);
@@ -69,10 +66,8 @@ PrefService::PrefService(
PrefService::~PrefService() {
DCHECK(CalledOnValidThread());
- // Remove our callbacks, setting NULL ones.
+ // Remove our callback, setting a NULL one.
pref_registry_->SetRegistrationCallback(PrefRegistry::RegistrationCallback());
- pref_registry_->SetUnregistrationCallback(
- PrefRegistry::UnregistrationCallback());
// Reset pointers so accesses after destruction reliably crash.
pref_value_store_.reset();
@@ -356,14 +351,6 @@ void PrefService::AddRegisteredPreference(const char* path,
user_pref_store_->MarkNeedsEmptyValue(path);
}
-// TODO(joi): We can get rid of this once the ability to unregister
-// prefs has been removed.
-void PrefService::RemoveRegisteredPreference(const char* path) {
- DCHECK(CalledOnValidThread());
-
- prefs_map_.erase(path);
-}
-
void PrefService::ClearPref(const char* path) {
DCHECK(CalledOnValidThread());
« no previous file with comments | « base/prefs/pref_service.h ('k') | chrome/browser/chromeos/login/oauth2_login_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698