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

Unified Diff: chrome/browser/ui/webui/workers_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
« no previous file with comments | « chrome/browser/ui/webui/theme_source.h ('k') | content/renderer/render_widget_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/workers_ui.cc
diff --git a/chrome/browser/ui/webui/workers_ui.cc b/chrome/browser/ui/webui/workers_ui.cc
index 52cd620182d0ad7a4a4341bc4ef2071d52d0932c..f2220a31d8fd20ee41446f5fa1cd5d53293a0f9d 100644
--- a/chrome/browser/ui/webui/workers_ui.cc
+++ b/chrome/browser/ui/webui/workers_ui.cc
@@ -101,11 +101,7 @@ void WorkersUIHTMLSource::SendSharedWorkersData(int request_id) {
std::string json_string;
base::JSONWriter::Write(&workers_list, false, &json_string);
- scoped_refptr<RefCountedBytes> json_bytes(new RefCountedBytes());
- json_bytes->data.resize(json_string.size());
- std::copy(json_string.begin(), json_string.end(), json_bytes->data.begin());
-
- SendResponse(request_id, json_bytes);
+ SendResponse(request_id, base::RefCountedString::TakeString(&json_string));
}
class WorkersDOMHandler : public WebUIMessageHandler {
« no previous file with comments | « chrome/browser/ui/webui/theme_source.h ('k') | content/renderer/render_widget_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698