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

Unified Diff: chrome/browser/ui/webui/chrome_web_ui_data_source.cc

Issue 7397021: Re-land r93365 - add RefCountedString (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/chrome_web_ui_data_source.cc
diff --git a/chrome/browser/ui/webui/chrome_web_ui_data_source.cc b/chrome/browser/ui/webui/chrome_web_ui_data_source.cc
index 4f74f517b04b5cf92ac0e5a8b35cb101cce23091..e4ca9b128b1eb76b5b7780cd6e945d2218a499c7 100644
--- a/chrome/browser/ui/webui/chrome_web_ui_data_source.cc
+++ b/chrome/browser/ui/webui/chrome_web_ui_data_source.cc
@@ -54,12 +54,9 @@ void ChromeWebUIDataSource::StartDataRequest(const std::string& path,
void ChromeWebUIDataSource::SendLocalizedStringsAsJSON(int request_id) {
std::string template_data;
- scoped_refptr<RefCountedBytes> response(new RefCountedBytes);
SetFontAndTextDirection(&localized_strings_);
jstemplate_builder::AppendJsonJS(&localized_strings_, &template_data);
- response->data.resize(template_data.size());
- std::copy(template_data.begin(), template_data.end(),response->data.begin());
- SendResponse(request_id, response);
+ SendResponse(request_id, base::RefCountedString::TakeString(&template_data));
}
void ChromeWebUIDataSource::SendFromResourceBundle(int request_id, int idr) {
« no previous file with comments | « chrome/browser/ui/webui/bug_report_ui.cc ('k') | chrome/browser/ui/webui/chromeos/choose_mobile_network_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698