diff options
Diffstat (limited to 'chrome/browser/dom_ui/shown_sections_handler.cc')
-rw-r--r-- | chrome/browser/dom_ui/shown_sections_handler.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/chrome/browser/dom_ui/shown_sections_handler.cc b/chrome/browser/dom_ui/shown_sections_handler.cc index 78ff716..e32511d 100644 --- a/chrome/browser/dom_ui/shown_sections_handler.cc +++ b/chrome/browser/dom_ui/shown_sections_handler.cc @@ -48,11 +48,8 @@ int ShownSectionsHandler::GetShownSections(PrefService* prefs) { ShownSectionsHandler::ShownSectionsHandler(PrefService* pref_service) : pref_service_(pref_service) { - pref_service_->AddPrefObserver(prefs::kNTPShownSections, this); -} - -ShownSectionsHandler::~ShownSectionsHandler() { - pref_service_->RemovePrefObserver(prefs::kNTPShownSections, this); + registrar_.Init(pref_service); + registrar_.Add(prefs::kNTPShownSections, this); } void ShownSectionsHandler::RegisterMessages() { |