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

Unified Diff: chrome/browser/extensions/api/idltest/idltest_api.cc

Issue 2065793002: Return a unique_ptr from BinaryValue::CreateWithCopiedBuffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Android and CrOS Created 4 years, 6 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/extensions/api/idltest/idltest_api.cc
diff --git a/chrome/browser/extensions/api/idltest/idltest_api.cc b/chrome/browser/extensions/api/idltest/idltest_api.cc
index 3f280cf5e194423aa2b0e98e6db7ee7823378b71..7b341530d7459be41316cb3348649471c261031a 100644
--- a/chrome/browser/extensions/api/idltest/idltest_api.cc
+++ b/chrome/browser/extensions/api/idltest/idltest_api.cc
@@ -8,7 +8,6 @@
#include <memory>
-#include "base/memory/ptr_util.h"
#include "base/values.h"
using base::BinaryValue;
@@ -43,8 +42,6 @@ bool IdltestSendArrayBufferViewFunction::RunSync() {
bool IdltestGetArrayBufferFunction::RunSync() {
std::string hello = "hello world";
- BinaryValue* output =
- BinaryValue::CreateWithCopiedBuffer(hello.c_str(), hello.size());
- SetResult(base::WrapUnique(output));
+ SetResult(BinaryValue::CreateWithCopiedBuffer(hello.c_str(), hello.size()));
return true;
}

Powered by Google App Engine
This is Rietveld 408576698