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

Unified Diff: chrome/browser/ui/webui/ntp/new_tab_ui.cc

Issue 8438028: ntp: remove ShownSectionHandler and all references to it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more functional test updates Created 9 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 | « chrome/browser/ui/webui/ntp/new_tab_ui.h ('k') | chrome/browser/ui/webui/ntp/new_tab_ui_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 135362386795a85c620983f8684c83a6eb7c598f..b5bd4a65615f371f55140922cc0174d5da1aacb7 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
@@ -35,7 +35,6 @@
#include "chrome/browser/ui/webui/ntp/ntp_resource_cache.h"
#include "chrome/browser/ui/webui/ntp/ntp_resource_cache_factory.h"
#include "chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.h"
-#include "chrome/browser/ui/webui/ntp/shown_sections_handler.h"
#include "chrome/browser/ui/webui/theme_source.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
@@ -82,8 +81,6 @@ NewTabUI::NewTabUI(TabContents* contents)
link_transition_type_ = content::PAGE_TRANSITION_AUTO_BOOKMARK;
if (!GetProfile()->IsOffTheRecord()) {
- PrefService* pref_service = GetProfile()->GetPrefs();
- AddMessageHandler((new ShownSectionsHandler(pref_service))->Attach(this));
AddMessageHandler((new browser_sync::ForeignSessionHandler())->
Attach(this));
AddMessageHandler((new MostVisitedHandler())->Attach(this));
@@ -225,36 +222,11 @@ void NewTabUI::InitializeCSSCaches() {
// static
void NewTabUI::RegisterUserPrefs(PrefService* prefs) {
- prefs->RegisterIntegerPref(prefs::kNTPPrefVersion,
- 0,
- PrefService::UNSYNCABLE_PREF);
-
NewTabPageHandler::RegisterUserPrefs(prefs);
AppLauncherHandler::RegisterUserPrefs(prefs);
MostVisitedHandler::RegisterUserPrefs(prefs);
- ShownSectionsHandler::RegisterUserPrefs(prefs);
if (NTP4Enabled())
BookmarksHandler::RegisterUserPrefs(prefs);
-
- UpdateUserPrefsVersion(prefs);
-}
-
-// static
-bool NewTabUI::UpdateUserPrefsVersion(PrefService* prefs) {
- const int old_pref_version = prefs->GetInteger(prefs::kNTPPrefVersion);
- if (old_pref_version != current_pref_version()) {
- MigrateUserPrefs(prefs, old_pref_version, current_pref_version());
- prefs->SetInteger(prefs::kNTPPrefVersion, current_pref_version());
- return true;
- }
- return false;
-}
-
-// static
-void NewTabUI::MigrateUserPrefs(PrefService* prefs, int old_pref_version,
- int new_pref_version) {
- ShownSectionsHandler::MigrateUserPrefs(prefs, old_pref_version,
- current_pref_version());
}
// static
« no previous file with comments | « chrome/browser/ui/webui/ntp/new_tab_ui.h ('k') | chrome/browser/ui/webui/ntp/new_tab_ui_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698