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

Unified Diff: chrome/browser/ui/webui/history2_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/gpu_internals_ui.cc ('k') | chrome/browser/ui/webui/media/media_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/history2_ui.cc
diff --git a/chrome/browser/ui/webui/history2_ui.cc b/chrome/browser/ui/webui/history2_ui.cc
index ab9385cdd0106a32e88d28b477d1d04d9b47fd5c..4e5fc27d82b8bffb465a10e39c07b8e399dad482 100644
--- a/chrome/browser/ui/webui/history2_ui.cc
+++ b/chrome/browser/ui/webui/history2_ui.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/ui/webui/history2_ui.h"
-#include <algorithm>
#include <set>
#include "base/callback.h"
@@ -101,14 +100,10 @@ void HistoryUIHTMLSource2::StartDataRequest(const std::string& path,
static const base::StringPiece history_html(
ResourceBundle::GetSharedInstance().GetRawDataResource(
IDR_HISTORY2_HTML));
- const std::string full_html = jstemplate_builder::GetI18nTemplateHtml(
+ std::string full_html = jstemplate_builder::GetI18nTemplateHtml(
history_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));
}
std::string HistoryUIHTMLSource2::GetMimeType(const std::string&) const {
« no previous file with comments | « chrome/browser/ui/webui/gpu_internals_ui.cc ('k') | chrome/browser/ui/webui/media/media_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698