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

Unified Diff: chrome/browser/ui/webui/collected_cookies_ui_delegate.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
Index: chrome/browser/ui/webui/collected_cookies_ui_delegate.cc
diff --git a/chrome/browser/ui/webui/collected_cookies_ui_delegate.cc b/chrome/browser/ui/webui/collected_cookies_ui_delegate.cc
index 51edd3be3ede2e5dc147b5f26ad3587baec0b264..ca18acb3add6a21f0227d3b98ac7e29cc4e43ccf 100644
--- a/chrome/browser/ui/webui/collected_cookies_ui_delegate.cc
+++ b/chrome/browser/ui/webui/collected_cookies_ui_delegate.cc
@@ -121,14 +121,10 @@ void CollectedCookiesSource::StartDataRequest(const std::string& path,
static const base::StringPiece html(
ResourceBundle::GetSharedInstance().GetRawDataResource(
IDR_COLLECTED_COOKIES_HTML));
- const std::string response = jstemplate_builder::GetI18nTemplateHtml(
+ std::string response = jstemplate_builder::GetI18nTemplateHtml(
html, &localized_strings);
- scoped_refptr<RefCountedBytes> html_bytes(new RefCountedBytes);
- html_bytes->data.resize(response.size());
- std::copy(response.begin(), response.end(), html_bytes->data.begin());
-
- SendResponse(request_id, html_bytes);
+ SendResponse(request_id, base::RefCountedString::TakeString(&response));
}
} // namespace
« no previous file with comments | « chrome/browser/ui/webui/chromeos/system_info_ui.cc ('k') | chrome/browser/ui/webui/extension_icon_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698