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

Unified Diff: chrome/browser/prefs/overlay_user_pref_store.cc

Issue 10068036: RefCounted types should not have public destructors, chrome/browser/ part 5 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win fix Created 8 years, 8 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 | « chrome/browser/prefs/overlay_user_pref_store.h ('k') | chrome/browser/prefs/testing_pref_store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/overlay_user_pref_store.cc
diff --git a/chrome/browser/prefs/overlay_user_pref_store.cc b/chrome/browser/prefs/overlay_user_pref_store.cc
index 8d04ec361e98a13154de661447e6efa53d432fd5..b91af6319b99c245de2017a3c0951a75f6603ad7 100644
--- a/chrome/browser/prefs/overlay_user_pref_store.cc
+++ b/chrome/browser/prefs/overlay_user_pref_store.cc
@@ -13,10 +13,6 @@ OverlayUserPrefStore::OverlayUserPrefStore(
underlay_->AddObserver(this);
}
-OverlayUserPrefStore::~OverlayUserPrefStore() {
- underlay_->RemoveObserver(this);
-}
-
bool OverlayUserPrefStore::IsSetInOverlay(const std::string& key) const {
return overlay_.GetValue(key, NULL);
}
@@ -136,6 +132,16 @@ void OverlayUserPrefStore::ReportValueChanged(const std::string& key) {
FOR_EACH_OBSERVER(PrefStore::Observer, observers_, OnPrefValueChanged(key));
}
+void OverlayUserPrefStore::OnPrefValueChanged(const std::string& key) {
+ if (!overlay_.GetValue(GetOverlayKey(key), NULL))
+ ReportValueChanged(GetOverlayKey(key));
+}
+
+void OverlayUserPrefStore::OnInitializationCompleted(bool succeeded) {
+ FOR_EACH_OBSERVER(PrefStore::Observer, observers_,
+ OnInitializationCompleted(succeeded));
+}
+
void OverlayUserPrefStore::RegisterOverlayPref(const std::string& key) {
RegisterOverlayPref(key, key);
}
@@ -155,14 +161,8 @@ void OverlayUserPrefStore::RegisterOverlayPref(
underlay_to_overlay_names_map_[underlay_key] = overlay_key;
}
-void OverlayUserPrefStore::OnPrefValueChanged(const std::string& key) {
- if (!overlay_.GetValue(GetOverlayKey(key), NULL))
- ReportValueChanged(GetOverlayKey(key));
-}
-
-void OverlayUserPrefStore::OnInitializationCompleted(bool succeeded) {
- FOR_EACH_OBSERVER(PrefStore::Observer, observers_,
- OnInitializationCompleted(succeeded));
+OverlayUserPrefStore::~OverlayUserPrefStore() {
+ underlay_->RemoveObserver(this);
}
const std::string& OverlayUserPrefStore::GetOverlayKey(
« no previous file with comments | « chrome/browser/prefs/overlay_user_pref_store.h ('k') | chrome/browser/prefs/testing_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698