| 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 bf78cd0540a8b9bc919465796ad41bb93f9eae66..159a06d16dfcc7b96c96605fa50dd6a41d8cbed9 100644
|
| --- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc
|
| +++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
|
| @@ -249,13 +249,6 @@ void NewTabUI::Observe(int type,
|
| const content::NotificationSource& source,
|
| const content::NotificationDetails& details) {
|
| switch (type) {
|
| - case chrome::NOTIFICATION_PREF_CHANGED: { // kShowBookmarkBar
|
| - StringValue attached(
|
| - GetProfile()->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar) ?
|
| - "true" : "false");
|
| - web_ui()->CallJavascriptFunction("ntp.setBookmarkBarAttached", attached);
|
| - break;
|
| - }
|
| #if defined(ENABLE_THEMES)
|
| case chrome::NOTIFICATION_BROWSER_THEME_CHANGED: {
|
| InitializeCSSCaches();
|
| @@ -288,6 +281,14 @@ void NewTabUI::Observe(int type,
|
| }
|
| }
|
|
|
| +void NewTabUI::OnPreferenceChanged(PrefServiceBase* service,
|
| + const std::string& pref_name) {
|
| + StringValue attached(
|
| + GetProfile()->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar) ?
|
| + "true" : "false");
|
| + web_ui()->CallJavascriptFunction("ntp.setBookmarkBarAttached", attached);
|
| +}
|
| +
|
| void NewTabUI::InitializeCSSCaches() {
|
| #if defined(ENABLE_THEMES)
|
| Profile* profile = GetProfile();
|
|
|