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

Unified Diff: extensions/browser/extension_function.cc

Issue 2038613003: Revert of ExtensionFunction: don't pass ownership of base::Value by raw pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « extensions/browser/extension_function.h ('k') | extensions/shell/browser/api/identity/identity_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/extension_function.cc
diff --git a/extensions/browser/extension_function.cc b/extensions/browser/extension_function.cc
index a6a4b98ea4030979897a168ecb5e804cc3c347c8..98ef88f9ca8cd02a8c68a04814ca032b73a84721 100644
--- a/extensions/browser/extension_function.cc
+++ b/extensions/browser/extension_function.cc
@@ -291,19 +291,24 @@
}
ExtensionFunction::ResponseValue ExtensionFunction::OneArgument(
- std::unique_ptr<base::Value> arg) {
+ base::Value* arg) {
std::unique_ptr<base::ListValue> args(new base::ListValue());
- args->Append(std::move(arg));
+ args->Append(arg);
return ResponseValue(new ArgumentListResponseValue(name(), "OneArgument",
this, std::move(args)));
}
+ExtensionFunction::ResponseValue ExtensionFunction::OneArgument(
+ std::unique_ptr<base::Value> arg) {
+ return OneArgument(arg.release());
+}
+
ExtensionFunction::ResponseValue ExtensionFunction::TwoArguments(
- std::unique_ptr<base::Value> arg1,
- std::unique_ptr<base::Value> arg2) {
+ base::Value* arg1,
+ base::Value* arg2) {
std::unique_ptr<base::ListValue> args(new base::ListValue());
- args->Append(std::move(arg1));
- args->Append(std::move(arg2));
+ args->Append(arg1);
+ args->Append(arg2);
return ResponseValue(new ArgumentListResponseValue(name(), "TwoArguments",
this, std::move(args)));
}
« no previous file with comments | « extensions/browser/extension_function.h ('k') | extensions/shell/browser/api/identity/identity_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698