summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui/dom_ui_theme_source.cc
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-29 19:48:54 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-29 19:48:54 +0000
commit08daf0542dc5743a82bf55e8684bf1625ad7d997 (patch)
treeff4c2a2199746fff3c6d29e46d32e7e0e9e5ced9 /chrome/browser/dom_ui/dom_ui_theme_source.cc
parentaece9ccd4c38dca6daad04c94d1cc96677e1fbac (diff)
downloadchromium_src-08daf0542dc5743a82bf55e8684bf1625ad7d997.zip
chromium_src-08daf0542dc5743a82bf55e8684bf1625ad7d997.tar.gz
chromium_src-08daf0542dc5743a82bf55e8684bf1625ad7d997.tar.bz2
Convert ReplaceStringPlaceholders(std::string...) to take a
StringPiece as the format string instead. This allows us to save a string copy in the new tab page. Also clean up some code in the extensions process binding that was doing excess string conversions. BUG=26228 Review URL: http://codereview.chromium.org/347019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30491 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui/dom_ui_theme_source.cc')
-rw-r--r--chrome/browser/dom_ui/dom_ui_theme_source.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/chrome/browser/dom_ui/dom_ui_theme_source.cc b/chrome/browser/dom_ui/dom_ui_theme_source.cc
index f81193d..49e227f 100644
--- a/chrome/browser/dom_ui/dom_ui_theme_source.cc
+++ b/chrome/browser/dom_ui/dom_ui_theme_source.cc
@@ -193,9 +193,8 @@ void DOMUIThemeSource::InitNewTabCSS() {
IDR_NEW_TAB_THEME_CSS));
// Create the string from our template and the replacements.
- std::string format_string = new_tab_theme_css.as_string();
const std::string css_string = ReplaceStringPlaceholders(
- format_string, subst, NULL);
+ new_tab_theme_css, subst, NULL);
new_tab_css_ = ReplaceStringPlaceholders(
css_string, subst2, NULL);
}
@@ -227,9 +226,8 @@ void DOMUIThemeSource::InitNewIncognitoTabCSS() {
IDR_NEW_INCOGNITO_TAB_THEME_CSS));
// Create the string from our template and the replacements.
- std::string format_string = new_tab_theme_css.as_string();
new_incognito_tab_css_ = ReplaceStringPlaceholders(
- format_string, subst, NULL);
+ new_tab_theme_css, subst, NULL);
}
void DOMUIThemeSource::SendNewTabCSS(int request_id,