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

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

Issue 7397021: Re-land r93365 - add RefCountedString (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit_tests 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/sessions_ui.cc
diff --git a/chrome/browser/ui/webui/sessions_ui.cc b/chrome/browser/ui/webui/sessions_ui.cc
index 7b2ed5c42e571ae10323e8d6c685129df40d3d13..641816cc01d2eb692fbe67ba491f5f962b4a70d3 100644
--- a/chrome/browser/ui/webui/sessions_ui.cc
+++ b/chrome/browser/ui/webui/sessions_ui.cc
@@ -77,11 +77,7 @@ void SessionsUIHTMLSource::StartDataRequest(const std::string& path,
&localized_strings);
jstemplate_builder::AppendJsTemplateSourceHtml(&full_html);
- 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));
}
////////////////////////////////////////////////////////////////////////////////

Powered by Google App Engine
This is Rietveld 408576698