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

Unified Diff: chrome/browser/ui/webui/ntp/ntp_resource_cache.h

Issue 11348165: Remove PrefObserver usages, batch 10. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
Index: chrome/browser/ui/webui/ntp/ntp_resource_cache.h
diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache.h b/chrome/browser/ui/webui/ntp/ntp_resource_cache.h
index 83bfab24ab1af481837cf7d575f013468629bc83..2c26b05fe9177df165aa453e30896b0a0047b5d7 100644
--- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.h
+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.h
@@ -9,7 +9,6 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "base/prefs/public/pref_change_registrar.h"
-#include "base/prefs/public/pref_observer.h"
#include "base/string16.h"
#include "chrome/browser/profiles/profile_keyed_service.h"
#include "content/public/browser/notification_observer.h"
@@ -24,7 +23,6 @@ class RefCountedMemory;
// This class keeps a cache of NTP resources (HTML and CSS) so we don't have to
// regenerate them all the time.
class NTPResourceCache : public content::NotificationObserver,
- public PrefObserver,
public ProfileKeyedService {
public:
explicit NTPResourceCache(Profile* profile);
@@ -38,34 +36,34 @@ class NTPResourceCache : public content::NotificationObserver,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
- // PrefObserver interface.
- virtual void OnPreferenceChanged(PrefServiceBase* service,
- const std::string& pref_name) OVERRIDE;
-
private:
- Profile* profile_;
+ void OnPreferencesChanged();
Jói 2012/11/20 22:11:55 same suggestion as before: singular OnPreferenceCh
tfarina 2012/11/20 23:41:20 Done.
void CreateNewTabHTML();
- scoped_refptr<base::RefCountedMemory> new_tab_html_;
// Helper to determine if the resource cache should be invalidated.
// This is called on every page load, and can be used to check values that
// don't generate a notification when changed (e.g., system preferences).
bool NewTabCacheNeedsRefresh();
+ Profile* profile_;
+
+ scoped_refptr<base::RefCountedMemory> new_tab_html_;
+
#if !defined(OS_ANDROID)
// Returns a message describing any newly-added sync types, or an empty
// string if all types have already been acknowledged.
string16 GetSyncTypeMessage();
void CreateNewTabIncognitoHTML();
- scoped_refptr<base::RefCountedMemory> new_tab_incognito_html_;
void CreateNewTabIncognitoCSS();
- scoped_refptr<base::RefCountedMemory> new_tab_incognito_css_;
+
void CreateNewTabCSS();
- scoped_refptr<base::RefCountedMemory> new_tab_css_;
+ scoped_refptr<base::RefCountedMemory> new_tab_incognito_html_;
+ scoped_refptr<base::RefCountedMemory> new_tab_incognito_css_;
+ scoped_refptr<base::RefCountedMemory> new_tab_css_;
content::NotificationRegistrar registrar_;
PrefChangeRegistrar pref_change_registrar_;
#endif

Powered by Google App Engine
This is Rietveld 408576698