Index: chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc |
diff --git a/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc b/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc |
index dfc5574d6d9e94c22b156cf58bc58286702219a3..0dfd028d0fbeb1279d7acdfc19ecaf4f728b42f5 100644 |
--- a/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc |
+++ b/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc |
@@ -295,14 +295,10 @@ void SimUnlockUIHTMLSource::StartDataRequest(const std::string& path, |
ResourceBundle::GetSharedInstance().GetRawDataResource( |
IDR_SIM_UNLOCK_HTML)); |
- const std::string& full_html = jstemplate_builder::GetI18nTemplateHtml( |
- html, &strings); |
+ std::string full_html = jstemplate_builder::GetI18nTemplateHtml(html, |
+ &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)); |
} |
// SimUnlockHandler ------------------------------------------------------------ |