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

Unified Diff: chrome/browser/dom_ui/ntp_resource_cache.cc

Issue 460007: Revert 33527 - Put "make this my home page" link into the tip section.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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 | « no previous file | chrome/browser/dom_ui/tips_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/ntp_resource_cache.cc
===================================================================
--- chrome/browser/dom_ui/ntp_resource_cache.cc (revision 33537)
+++ chrome/browser/dom_ui/ntp_resource_cache.cc (working copy)
@@ -143,6 +143,7 @@
// Watch for pref changes that cause us to need to invalidate the HTML cache.
PrefService* pref_service = profile_->GetPrefs();
pref_service->AddPrefObserver(prefs::kShowBookmarkBar, this);
+ pref_service->AddPrefObserver(prefs::kHomePageIsNewTabPage, this);
pref_service->AddPrefObserver(prefs::kNTPShownSections, this);
// Watch for pref changes that cause us to need to invalidate the CSS cache.
@@ -152,6 +153,7 @@
NTPResourceCache::~NTPResourceCache() {
PrefService* pref_service = profile_->GetPrefs();
pref_service->RemovePrefObserver(prefs::kShowBookmarkBar, this);
+ pref_service->RemovePrefObserver(prefs::kHomePageIsNewTabPage, this);
pref_service->RemovePrefObserver(prefs::kNTPShownSections, this);
pref_service->RemovePrefObserver(prefs::kNTPPromoLineRemaining, this);
@@ -357,6 +359,9 @@
else
localized_strings.SetString(L"syncispresent", "false");
+ if (!profile_->GetPrefs()->GetBoolean(prefs::kHomePageIsNewTabPage))
+ localized_strings.SetString(L"showsetashomepage", "true");
+
ChromeURLDataManager::DataSource::SetFontAndTextDirection(&localized_strings);
// Control fade and resize animations.
« no previous file with comments | « no previous file | chrome/browser/dom_ui/tips_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698