From d7b720c248a214a987f57a3a9fb304c1b01f9f4c Mon Sep 17 00:00:00 2001 From: "tony@chromium.org" Date: Tue, 24 Nov 2009 01:32:22 +0000 Subject: Move the NTP HTML generation to early so we can avoid an extra trip to the UI thread later. Not sure if this will make a difference. Move the NTP and CSS handler init to after adding the MostVistedHandler. This should allow an earlier db fetch for the cases when the HTML/CSS are not in the cache (e.g., browser startup). Review URL: http://codereview.chromium.org/439013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32899 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/dom_ui/new_tab_ui.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'chrome/browser/dom_ui/new_tab_ui.h') diff --git a/chrome/browser/dom_ui/new_tab_ui.h b/chrome/browser/dom_ui/new_tab_ui.h index d612dd9..6d73f85 100644 --- a/chrome/browser/dom_ui/new_tab_ui.h +++ b/chrome/browser/dom_ui/new_tab_ui.h @@ -73,8 +73,9 @@ class NewTabUI : public DOMUI, // Whether this is the first run. static bool first_run_; - // Pointer back to the original profile. - Profile* profile_; + // We grab the HTML eagerly so we don't have to go back to the UI thread + // later. + scoped_refptr html_bytes_; DISALLOW_COPY_AND_ASSIGN(NewTabHTMLSource); }; -- cgit v1.1