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

Unified Diff: chrome/browser/extensions/extension_management_api.cc

Issue 10694106: Added support for multiple parameters to Extension API callbacks. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Indentation fixes and comment. Created 8 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
Index: chrome/browser/extensions/extension_management_api.cc
diff --git a/chrome/browser/extensions/extension_management_api.cc b/chrome/browser/extensions/extension_management_api.cc
index df9fd2d5ef97237e6487c9ec20d0a0b6e30eea33..f7a64d886e45035a3256e031217db7e9c7915751 100644
--- a/chrome/browser/extensions/extension_management_api.cc
+++ b/chrome/browser/extensions/extension_management_api.cc
@@ -162,7 +162,7 @@ static void AddExtensionInfo(ListValue* list,
bool GetAllExtensionsFunction::RunImpl() {
ListValue* result = new ListValue();
- result_.reset(result);
+ SetSingleResult(result);
AddExtensionInfo(result, *service()->extensions(), service());
AddExtensionInfo(result, *service()->disabled_extensions(), service());
@@ -180,7 +180,7 @@ bool GetExtensionByIdFunction::RunImpl() {
return false;
}
DictionaryValue* result = CreateExtensionInfo(*extension, service());
- result_.reset(result);
+ SetSingleResult(result);
return true;
}
@@ -201,7 +201,7 @@ bool GetPermissionWarningsByIdFunction::RunImpl() {
for (PermissionMessages::const_iterator i = warnings.begin();
i < warnings.end(); ++i)
result->Append(Value::CreateStringValue(i->message()));
- result_.reset(result);
+ SetSingleResult(result);
return true;
}
@@ -325,7 +325,7 @@ void GetPermissionWarningsByManifestFunction::OnParseSuccess(
for (PermissionMessages::const_iterator i = warnings.begin();
i < warnings.end(); ++i)
result->Append(Value::CreateStringValue(i->message()));
- result_.reset(result);
+ SetSingleResult(result);
SendResponse(true);
// Matched with AddRef() in RunImpl().

Powered by Google App Engine
This is Rietveld 408576698