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

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

Issue 7397021: Re-land r93365 - add RefCountedString (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased onto r93582 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/textfields_ui.cc
diff --git a/chrome/browser/ui/webui/textfields_ui.cc b/chrome/browser/ui/webui/textfields_ui.cc
index 819048e5b82e43d3dad24d217c16d29992e475d4..3e4691e9f9c722e7f22a8dca8023a14bd47591c4 100644
--- a/chrome/browser/ui/webui/textfields_ui.cc
+++ b/chrome/browser/ui/webui/textfields_ui.cc
@@ -29,14 +29,10 @@ TextfieldsUIHTMLSource::TextfieldsUIHTMLSource()
void TextfieldsUIHTMLSource::StartDataRequest(const std::string& path,
bool is_incognito,
int request_id) {
- const std::string full_html = ResourceBundle::GetSharedInstance()
+ std::string full_html = ResourceBundle::GetSharedInstance()
.GetRawDataResource(IDR_TEXTFIELDS_HTML).as_string();
bulach 2011/07/22 11:16:54 use LoadDataResourceBytes as options_ui.cc instead
- 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 TextfieldsUIHTMLSource::GetMimeType(

Powered by Google App Engine
This is Rietveld 408576698