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

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

Issue 15517005: Remove references to Profile from browser_context_keyed_service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase & style Created 7 years, 7 months 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_NTP_RESOURCE_CACHE_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_NTP_RESOURCE_CACHE_H_
6 #define CHROME_BROWSER_UI_WEBUI_NTP_NTP_RESOURCE_CACHE_H_ 6 #define CHROME_BROWSER_UI_WEBUI_NTP_NTP_RESOURCE_CACHE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/prefs/pref_change_registrar.h" 11 #include "base/prefs/pref_change_registrar.h"
12 #include "base/string16.h" 12 #include "base/string16.h"
13 #include "components/browser_context_keyed_service/browser_context_keyed_service .h" 13 #include "components/browser_context_keyed_service/browser_context_keyed_service .h"
14 #include "content/public/browser/notification_observer.h" 14 #include "content/public/browser/notification_observer.h"
15 #include "content/public/browser/notification_registrar.h" 15 #include "content/public/browser/notification_registrar.h"
16 16
17 class Profile; 17 class Profile;
18 18
19 namespace base { 19 namespace base {
20 class RefCountedMemory; 20 class RefCountedMemory;
21 } 21 }
22 22
23 // This class keeps a cache of NTP resources (HTML and CSS) so we don't have to 23 // This class keeps a cache of NTP resources (HTML and CSS) so we don't have to
24 // regenerate them all the time. 24 // regenerate them all the time.
25 class NTPResourceCache : public content::NotificationObserver, 25 class NTPResourceCache : public content::NotificationObserver,
26 public ProfileKeyedService { 26 public BrowserContextKeyedService {
27 public: 27 public:
28 explicit NTPResourceCache(Profile* profile); 28 explicit NTPResourceCache(Profile* profile);
29 virtual ~NTPResourceCache(); 29 virtual ~NTPResourceCache();
30 30
31 base::RefCountedMemory* GetNewTabHTML(bool is_incognito); 31 base::RefCountedMemory* GetNewTabHTML(bool is_incognito);
32 base::RefCountedMemory* GetNewTabCSS(bool is_incognito); 32 base::RefCountedMemory* GetNewTabCSS(bool is_incognito);
33 33
34 void set_should_show_apps_page(bool should_show_apps_page) { 34 void set_should_show_apps_page(bool should_show_apps_page) {
35 should_show_apps_page_ = should_show_apps_page; 35 should_show_apps_page_ = should_show_apps_page;
36 } 36 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // The next three all default to true and can be manually set, e.g., by the 89 // The next three all default to true and can be manually set, e.g., by the
90 // chrome://apps page. 90 // chrome://apps page.
91 bool should_show_most_visited_page_; 91 bool should_show_most_visited_page_;
92 bool should_show_other_devices_menu_; 92 bool should_show_other_devices_menu_;
93 bool should_show_recently_closed_menu_; 93 bool should_show_recently_closed_menu_;
94 94
95 DISALLOW_COPY_AND_ASSIGN(NTPResourceCache); 95 DISALLOW_COPY_AND_ASSIGN(NTPResourceCache);
96 }; 96 };
97 97
98 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NTP_RESOURCE_CACHE_H_ 98 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NTP_RESOURCE_CACHE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698