| Index: chrome/browser/ui/webui/ntp/new_tab_ui.cc
|
| diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.cc b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
|
| index 9121a36fcf4ce96154ac1c563083e95915daf5ab..2aeb9afa19f9a4ff148b03efb94ed07c5e589a6c 100644
|
| --- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc
|
| +++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
|
| @@ -164,7 +164,9 @@ NewTabUI::NewTabUI(content::WebUI* web_ui)
|
| ChromeURLDataManager::AddDataSource(profile, html_source);
|
|
|
| pref_change_registrar_.Init(GetProfile()->GetPrefs());
|
| - pref_change_registrar_.Add(prefs::kShowBookmarkBar, this);
|
| + pref_change_registrar_.Add(prefs::kShowBookmarkBar,
|
| + base::Bind(&NewTabUI::OnShowBookmarkBarChanged,
|
| + base::Unretained(this)));
|
|
|
| #if defined(ENABLE_THEMES)
|
| // Listen for theme installation.
|
| @@ -260,8 +262,7 @@ void NewTabUI::Observe(int type,
|
| }
|
| }
|
|
|
| -void NewTabUI::OnPreferenceChanged(PrefServiceBase* service,
|
| - const std::string& pref_name) {
|
| +void NewTabUI::OnShowBookmarkBarChanged() {
|
| StringValue attached(
|
| GetProfile()->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar) ?
|
| "true" : "false");
|
|
|