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

Unified Diff: chrome/browser/ui/webui/active_downloads_ui.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
« no previous file with comments | « chrome/browser/ui/login/login_prompt_ui.cc ('k') | chrome/browser/ui/webui/bug_report_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/active_downloads_ui.cc
diff --git a/chrome/browser/ui/webui/active_downloads_ui.cc b/chrome/browser/ui/webui/active_downloads_ui.cc
index 4047c25a409e9b6e8d12e0d9228a44b0c682f594..59a6db7860a965802f4e6c3954d06592f06cd4e2 100644
--- a/chrome/browser/ui/webui/active_downloads_ui.cc
+++ b/chrome/browser/ui/webui/active_downloads_ui.cc
@@ -129,14 +129,10 @@ void ActiveDownloadsUIHTMLSource::StartDataRequest(const std::string& path,
static const base::StringPiece active_downloads_html(
ResourceBundle::GetSharedInstance().GetRawDataResource(
IDR_ACTIVE_DOWNLOADS_HTML));
- const std::string full_html = jstemplate_builder::GetI18nTemplateHtml(
+ std::string full_html = jstemplate_builder::GetI18nTemplateHtml(
active_downloads_html, &localized_strings);
- scoped_refptr<RefCountedBytes> html_bytes(new RefCountedBytes);
- html_bytes->data.resize(full_html.size());
- std::copy(full_html.begin(), full_html.end(), html_bytes->data.begin());
-
- SendResponse(request_id, html_bytes);
+ SendResponse(request_id, base::RefCountedString::TakeString(&full_html));
}
} // namespace
« no previous file with comments | « chrome/browser/ui/login/login_prompt_ui.cc ('k') | chrome/browser/ui/webui/bug_report_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698