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

Unified Diff: chrome/browser/browser_about_handler.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 | « base/memory/ref_counted_memory_unittest.cc ('k') | chrome/browser/browser_signin.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_about_handler.cc
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc
index 95785ffda35430af563c38e1dd792911d15aa117..f8cfcbfebd93427aceacc26543841bf06040c045 100644
--- a/chrome/browser/browser_about_handler.cc
+++ b/chrome/browser/browser_about_handler.cc
@@ -1421,10 +1421,8 @@ void AboutSource::StartDataRequest(const std::string& path,
}
void AboutSource::FinishDataRequest(const std::string& html, int request_id) {
- scoped_refptr<RefCountedBytes> html_bytes(new RefCountedBytes);
- html_bytes->data.resize(html.size());
- std::copy(html.begin(), html.end(), html_bytes->data.begin());
- SendResponse(request_id, html_bytes);
+ std::string html_copy(html);
+ SendResponse(request_id, base::RefCountedString::TakeString(&html_copy));
}
std::string AboutSource::GetMimeType(const std::string& path) const {
« no previous file with comments | « base/memory/ref_counted_memory_unittest.cc ('k') | chrome/browser/browser_signin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698