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

Unified Diff: extensions/browser/extension_function.cc

Issue 1991083002: Remove ExtensionFunction::SetResult(T*) overload. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IWYU 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
Index: extensions/browser/extension_function.cc
diff --git a/extensions/browser/extension_function.cc b/extensions/browser/extension_function.cc
index fd7bae96ceb8a557067d7079a91341d16c8b4a91..9203006c5181b520beeed140429b093e29ebf28e 100644
--- a/extensions/browser/extension_function.cc
+++ b/extensions/browser/extension_function.cc
@@ -256,12 +256,7 @@ void ExtensionFunction::OnQuotaExceeded(const std::string& violation_error) {
void ExtensionFunction::SetArgs(const base::ListValue* args) {
DCHECK(!args_.get()); // Should only be called once.
- args_.reset(args->DeepCopy());
-}
-
-void ExtensionFunction::SetResult(base::Value* result) {
- results_.reset(new base::ListValue());
- results_->Append(result);
+ args_ = args->CreateDeepCopy();
}
void ExtensionFunction::SetResult(std::unique_ptr<base::Value> result) {

Powered by Google App Engine
This is Rietveld 408576698