summaryrefslogtreecommitdiffstats
path: root/chrome/browser/profile.h
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-19 17:50:42 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-19 17:50:42 +0000
commit9c8dd907b6576fe18206bcd799efc1e5cdbacce7 (patch)
treee4713e517df0c73010dd2d99d16c6f89b6af230e /chrome/browser/profile.h
parent0efe30de7097be6fc6f9dd9b9ad167f40e437e7c (diff)
downloadchromium_src-9c8dd907b6576fe18206bcd799efc1e5cdbacce7.zip
chromium_src-9c8dd907b6576fe18206bcd799efc1e5cdbacce7.tar.gz
chromium_src-9c8dd907b6576fe18206bcd799efc1e5cdbacce7.tar.bz2
Implement a NTP resource cache. Instead of re-generating the
HTML for the NTP each time, keep a cached copy as part of the profile. - This changes the handling of StartDataRequest to always happen on the UI thread since it needs to use the Profile. Previously we would generate on the UI thread then handle all the requests on the IO thread. - first_view_ got changed into a static bool. I also removed it from being added to the json because it didn't appear to be used anywhere. - Merge the incognito and regular handler into one since I added that as a flag to the request in a previous change. I plan to add the CSS to NTPResourceCache next. BUG=23120 Review URL: http://codereview.chromium.org/399055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32520 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profile.h')
-rw-r--r--chrome/browser/profile.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/profile.h b/chrome/browser/profile.h
index 98e7aab..b8cec92 100644
--- a/chrome/browser/profile.h
+++ b/chrome/browser/profile.h
@@ -47,6 +47,7 @@ class ExtensionsService;
class FaviconService;
class HistoryService;
class NavigationController;
+class NTPResourceCache;
class PasswordStore;
class PersonalDataManager;
class PrefService;
@@ -382,6 +383,9 @@ class Profile {
// Start up service that gathers data from web resource feeds.
virtual void InitWebResources() = 0;
+ // Returns the new tab page resource cache.
+ virtual NTPResourceCache* GetNTPResourceCache() = 0;
+
#ifdef UNIT_TEST
// Use with caution. GetDefaultRequestContext may be called on any thread!
static void set_default_request_context(URLRequestContextGetter* c) {
@@ -481,6 +485,7 @@ class ProfileImpl : public Profile,
virtual void MarkAsCleanShutdown();
virtual void InitExtensions();
virtual void InitWebResources();
+ virtual NTPResourceCache* GetNTPResourceCache();
virtual ProfileSyncService* GetProfileSyncService();
void InitSyncService();
@@ -539,6 +544,7 @@ class ProfileImpl : public Profile,
scoped_ptr<TemplateURLModel> template_url_model_;
scoped_ptr<BookmarkModel> bookmark_bar_model_;
scoped_refptr<WebResourceService> web_resource_service_;
+ scoped_ptr<NTPResourceCache> ntp_resource_cache_;
scoped_ptr<ProfileSyncService> sync_service_;