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

Unified Diff: chrome/browser/ui/webui/media/media_internals_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/history2_ui.cc ('k') | chrome/browser/ui/webui/net_internals_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/media/media_internals_ui.cc
diff --git a/chrome/browser/ui/webui/media/media_internals_ui.cc b/chrome/browser/ui/webui/media/media_internals_ui.cc
index 6fc022914c320cac499da9edc375dd031e18ccd5..b794ff942f5e5f2d8b52d160e4d56e4dd1ee55a2 100644
--- a/chrome/browser/ui/webui/media/media_internals_ui.cc
+++ b/chrome/browser/ui/webui/media/media_internals_ui.cc
@@ -57,11 +57,7 @@ void MediaInternalsHTMLSource::StartDataRequest(const std::string& path,
jstemplate_builder::AppendJsonHtml(&localized_strings, &html);
jstemplate_builder::AppendI18nTemplateProcessHtml(&html);
- scoped_refptr<RefCountedBytes> bytes(new RefCountedBytes());
- bytes->data.resize(html.size());
- std::copy(html.begin(), html.end(), bytes->data.begin());
-
- SendResponse(request_id, bytes);
+ SendResponse(request_id, base::RefCountedString::TakeString(&html));
}
std::string MediaInternalsHTMLSource::GetMimeType(
« no previous file with comments | « chrome/browser/ui/webui/history2_ui.cc ('k') | chrome/browser/ui/webui/net_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698