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

Unified Diff: chrome/browser/ui/login/login_prompt_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
Index: chrome/browser/ui/login/login_prompt_ui.cc
diff --git a/chrome/browser/ui/login/login_prompt_ui.cc b/chrome/browser/ui/login/login_prompt_ui.cc
index d1d95926cf5e87ee400531f957ab7fdbed046352..3306ff2905577dcbfdd364994df3c8bacedf265d 100644
--- a/chrome/browser/ui/login/login_prompt_ui.cc
+++ b/chrome/browser/ui/login/login_prompt_ui.cc
@@ -46,11 +46,7 @@ class LoginHandlerSource : public ChromeURLDataManager::DataSource {
IDR_HTTP_AUTH_HTML));
std::string response = jstemplate_builder::GetI18nTemplateHtml(html, &dict);
- // Send the response.
- 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));
}
virtual std::string GetMimeType(const std::string& path) const {
« no previous file with comments | « chrome/browser/printing/print_preview_message_handler.cc ('k') | chrome/browser/ui/webui/active_downloads_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698