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

Unified Diff: chrome/browser/ui/webui/sync_internals_html_source.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/sessions_ui.cc ('k') | chrome/browser/ui/webui/task_manager_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/sync_internals_html_source.cc
diff --git a/chrome/browser/ui/webui/sync_internals_html_source.cc b/chrome/browser/ui/webui/sync_internals_html_source.cc
index c5c28090c2545d22bf0728d04b658f68f306fdd1..6e5333c585416237274fe35b86c0aecfa9e26aa6 100644
--- a/chrome/browser/ui/webui/sync_internals_html_source.cc
+++ b/chrome/browser/ui/webui/sync_internals_html_source.cc
@@ -4,8 +4,6 @@
#include "chrome/browser/ui/webui/sync_internals_html_source.h"
-#include <algorithm>
-
#include "base/memory/ref_counted.h"
#include "base/memory/ref_counted_memory.h"
#include "base/message_loop.h"
@@ -37,10 +35,7 @@ void SyncInternalsHTMLSource::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 SyncInternalsHTMLSource::GetMimeType(
« no previous file with comments | « chrome/browser/ui/webui/sessions_ui.cc ('k') | chrome/browser/ui/webui/task_manager_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698