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

Issue 344027: Some new tab ui fixes. (Closed)

Created:
11 years, 1 month ago by tony
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Some new tab ui fixes. 1) Always intialize the css cache. Previously we were only initializing if not in incognito mode. If the first NTP was an incognito page, it wouldn't be styled. 2) Small optimization in generating the HTML to avoid calling ReplaceFirstSubstringAfterOffset which would need to move the bytes after the placeholder. 3) Only generate the css for the incognito or normal mode. Since the NTP only needs one, we only need to generate one. BUG=26228 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=30527

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -9 lines) Patch
M chrome/browser/dom_ui/dom_ui_theme_source.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/dom_ui/new_tab_ui.cc View 3 chunks +14 lines, -7 lines 1 comment Download

Messages

Total messages: 3 (0 generated)
tony
I tried also keeping the HTML/CSS in a scoped_refptr<RefCountedBytes> instead of std::string, but it doesn't ...
11 years, 1 month ago (2009-10-29 21:48:23 UTC) #1
Elliot Glaysher
Everything LGTM.
11 years, 1 month ago (2009-10-29 21:51:58 UTC) #2
Evan Martin
11 years, 1 month ago (2009-10-29 22:27:28 UTC) #3
http://codereview.chromium.org/344027/diff/1/3
File chrome/browser/dom_ui/new_tab_ui.cc (right):

http://codereview.chromium.org/344027/diff/1/3#newcode917
Line 917: "<!-- template data placeholder -->");
FWIW, if you want to get really anal about this, this calls strlen on the
string.  I think string::find() would work with a plain const char[].  Also
kFooBar for consts.

Powered by Google App Engine
This is Rietveld 408576698