OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_DOM_UI_NEW_TAB_UI_H_ | 5 #ifndef CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H_ |
6 #define CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H_ | 6 #define CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 | 82 |
83 // Pointer back to the original profile. | 83 // Pointer back to the original profile. |
84 Profile* profile_; | 84 Profile* profile_; |
85 | 85 |
86 DISALLOW_COPY_AND_ASSIGN(NewTabHTMLSource); | 86 DISALLOW_COPY_AND_ASSIGN(NewTabHTMLSource); |
87 }; | 87 }; |
88 | 88 |
89 private: | 89 private: |
90 FRIEND_TEST_ALL_PREFIXES(NewTabUITest, UpdateUserPrefsVersion); | 90 FRIEND_TEST_ALL_PREFIXES(NewTabUITest, UpdateUserPrefsVersion); |
91 | 91 |
92 void Observe(NotificationType type, | 92 virtual void Observe(NotificationType type, |
93 const NotificationSource& source, | 93 const NotificationSource& source, |
94 const NotificationDetails& details); | 94 const NotificationDetails& details); |
95 | 95 |
96 // Reset the CSS caches. | 96 // Reset the CSS caches. |
97 void InitializeCSSCaches(); | 97 void InitializeCSSCaches(); |
98 | 98 |
99 // Updates the user prefs version and calls |MigrateUserPrefs| if needed. | 99 // Updates the user prefs version and calls |MigrateUserPrefs| if needed. |
100 // Returns true if the version was updated. | 100 // Returns true if the version was updated. |
101 static bool UpdateUserPrefsVersion(PrefService* prefs); | 101 static bool UpdateUserPrefsVersion(PrefService* prefs); |
102 | 102 |
103 NotificationRegistrar registrar_; | 103 NotificationRegistrar registrar_; |
104 | 104 |
105 // The preference version. This used for migrating prefs of the NTP. | 105 // The preference version. This used for migrating prefs of the NTP. |
106 static const int current_pref_version_ = 3; | 106 static const int current_pref_version_ = 3; |
107 | 107 |
108 DISALLOW_COPY_AND_ASSIGN(NewTabUI); | 108 DISALLOW_COPY_AND_ASSIGN(NewTabUI); |
109 }; | 109 }; |
110 | 110 |
111 #endif // CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H_ | 111 #endif // CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H_ |
OLD | NEW |