From 156ed27bc42a66a694e243f3ecb0ad80f0c83351 Mon Sep 17 00:00:00 2001 From: "tony@chromium.org" Date: Mon, 23 Nov 2009 18:31:25 +0000 Subject: Take 2 at moving NTP CSS resources into the NTP resource cache. Moving the HTML to the cache saved 8ms on New Tab Warm on Windows, maybe we can shave a few more ms off by moving the CSS. The last change had a regression on the mac new tab perf, so I suspect it's the extra round trip to the UI thread when trying to load the CSS (the UI thread is probably just busy at that time). Instead, I'm moving the generation of the CSS to the time the object is constructed, rather than when the resource is requested. This is like the code before, except sometimes we'll hit the cache. BUG=26228 Review URL: http://codereview.chromium.org/427003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32815 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/dom_ui/dom_ui_unittest.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'chrome/browser/dom_ui/dom_ui_unittest.cc') diff --git a/chrome/browser/dom_ui/dom_ui_unittest.cc b/chrome/browser/dom_ui/dom_ui_unittest.cc index 712a2df..81df016 100644 --- a/chrome/browser/dom_ui/dom_ui_unittest.cc +++ b/chrome/browser/dom_ui/dom_ui_unittest.cc @@ -9,7 +9,7 @@ class DOMUITest : public RenderViewHostTestHarness { public: - DOMUITest() {} + DOMUITest() : ui_thread_(ChromeThread::UI, MessageLoop::current()) {} // Tests navigating with a DOM UI from a fresh (nothing pending or committed) // state, through pending, committed, then another navigation. The first page @@ -75,6 +75,8 @@ class DOMUITest : public RenderViewHostTestHarness { } private: + ChromeThread ui_thread_; + DISALLOW_COPY_AND_ASSIGN(DOMUITest); }; -- cgit v1.1