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

Unified Diff: chrome/browser/ui/webui/task_manager_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/webui/sync_internals_html_source.cc ('k') | chrome/browser/ui/webui/textfields_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/task_manager_ui.cc
diff --git a/chrome/browser/ui/webui/task_manager_ui.cc b/chrome/browser/ui/webui/task_manager_ui.cc
index 5a4a3166a7cc4333f3f9e4b3d29d69a000b517df..ae33f060ce1403377b6654d4a3ddef56344125fe 100644
--- a/chrome/browser/ui/webui/task_manager_ui.cc
+++ b/chrome/browser/ui/webui/task_manager_ui.cc
@@ -85,14 +85,10 @@ void TaskManagerUIHTMLSource::StartDataRequest(const std::string& path,
static const base::StringPiece task_manager_html(
ResourceBundle::GetSharedInstance().GetRawDataResource(
IDR_TASK_MANAGER_HTML));
- const std::string full_html = jstemplate_builder::GetI18nTemplateHtml(
+ std::string full_html = jstemplate_builder::GetI18nTemplateHtml(
task_manager_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/webui/sync_internals_html_source.cc ('k') | chrome/browser/ui/webui/textfields_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698