| Index: chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
|
| diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
|
| index 4d88b4db3cc7f85d0021457efe3c891a00eb9e73..8277c54d66441e2050e282b2bbfef6db5b4178d8 100644
|
| --- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
|
| +++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
|
| @@ -219,12 +219,6 @@ void NTPResourceCache::Observe(int type,
|
| new_tab_html_ = NULL;
|
| new_tab_incognito_css_ = NULL;
|
| new_tab_css_ = NULL;
|
| - } else if (chrome::NOTIFICATION_PREF_CHANGED == type) {
|
| - // A change occurred to one of the preferences we care about, so flush the
|
| - // cache.
|
| - new_tab_incognito_html_ = NULL;
|
| - new_tab_html_ = NULL;
|
| - new_tab_css_ = NULL;
|
| } else if (chrome::NOTIFICATION_NTP_BACKGROUND_THEME_Y_POS_CHANGED == type) {
|
| css_background_y_pos_ = *(content::Details<int>(details).ptr());
|
| if (new_tab_css_.get())
|
| @@ -234,6 +228,15 @@ void NTPResourceCache::Observe(int type,
|
| }
|
| }
|
|
|
| +void NTPResourceCache::OnPreferenceChanged(PrefServiceBase* service,
|
| + const std::string& pref_name) {
|
| + // A change occurred to one of the preferences we care about, so flush the
|
| + // cache.
|
| + new_tab_incognito_html_ = NULL;
|
| + new_tab_html_ = NULL;
|
| + new_tab_css_ = NULL;
|
| +}
|
| +
|
| void NTPResourceCache::CreateNewTabIncognitoHTML() {
|
| DictionaryValue localized_strings;
|
| localized_strings.SetString("title",
|
|
|