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

Side by Side Diff: chrome/browser/ui/webui/ntp/new_tab_page_handler.h

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ready for review. Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_HANDLER_H_
7 7
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/common/chrome_notification_types.h" 9 #include "chrome/common/chrome_notification_types.h"
10 #include "content/public/browser/web_ui_message_handler.h" 10 #include "content/public/browser/web_ui_message_handler.h"
11 11
12 class PrefService; 12 class PrefServiceSimple;
13 class PrefServiceSyncable;
13 class Profile; 14 class Profile;
14 15
15 // Handler for general New Tab Page functionality that does not belong in a 16 // Handler for general New Tab Page functionality that does not belong in a
16 // more specialized handler. 17 // more specialized handler.
17 class NewTabPageHandler : public content::WebUIMessageHandler { 18 class NewTabPageHandler : public content::WebUIMessageHandler {
18 public: 19 public:
19 NewTabPageHandler(); 20 NewTabPageHandler();
20 21
21 // Register NTP per-profile preferences. 22 // Register NTP per-profile preferences.
22 static void RegisterUserPrefs(PrefService* prefs); 23 static void RegisterUserPrefs(PrefServiceSyncable* prefs);
23 24
24 // Register NTP profile-independent preferences. 25 // Register NTP profile-independent preferences.
25 static void RegisterPrefs(PrefService* prefs); 26 static void RegisterPrefs(PrefServiceSimple* prefs);
Mattias Nissler (ping if slow) 2012/12/20 13:41:52 dead code?
Jói 2012/12/20 16:30:31 I think so, removed.
26 27
27 // Registers values (strings etc.) for the page. 28 // Registers values (strings etc.) for the page.
28 static void GetLocalizedValues(Profile* profile, DictionaryValue* values); 29 static void GetLocalizedValues(Profile* profile, DictionaryValue* values);
29 30
30 private: 31 private:
31 virtual ~NewTabPageHandler(); 32 virtual ~NewTabPageHandler();
32 33
33 // WebUIMessageHandler implementation. 34 // WebUIMessageHandler implementation.
34 virtual void RegisterMessages() OVERRIDE; 35 virtual void RegisterMessages() OVERRIDE;
35 36
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 static const int kHistogramEnumerationMax = 81 static const int kHistogramEnumerationMax =
81 (LAST_PAGE_ID >> kPageIdOffset) + 1; 82 (LAST_PAGE_ID >> kPageIdOffset) + 1;
82 83
83 // Helper to send out promo resource change notification. 84 // Helper to send out promo resource change notification.
84 void Notify(chrome::NotificationType notification_type); 85 void Notify(chrome::NotificationType notification_type);
85 86
86 DISALLOW_COPY_AND_ASSIGN(NewTabPageHandler); 87 DISALLOW_COPY_AND_ASSIGN(NewTabPageHandler);
87 }; 88 };
88 89
89 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_HANDLER_H_ 90 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698