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 { |