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

Unified Diff: chrome/browser/extensions/api/web_navigation/web_navigation_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: Review fixes. 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/api/web_navigation/web_navigation_api.cc
diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc b/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc
index b17dd6a14a8a4941702c0ac4d8e519720edd18b0..b78f6fca86ec7531c1180060827b694400f4da95 100644
--- a/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc
+++ b/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc
@@ -791,7 +791,7 @@ bool GetFrameFunction::RunImpl() {
int tab_id = params->details.tab_id;
int frame_id = params->details.frame_id;
- result_.reset(Value::CreateNullValue());
+ SetSingleResult(Value::CreateNullValue());
TabContents* tab_contents;
if (!ExtensionTabUtil::GetTabById(tab_id,
@@ -825,7 +825,7 @@ bool GetFrameFunction::RunImpl() {
frame_details.url = frame_url.spec();
frame_details.error_occurred =
frame_navigation_state.GetErrorOccurredInFrame(frame_id);
- result_.reset(GetFrame::Result::Create(frame_details));
+ SetSingleResult(GetFrame::Result::Create(frame_details));
return true;
}
@@ -834,7 +834,7 @@ bool GetAllFramesFunction::RunImpl() {
EXTENSION_FUNCTION_VALIDATE(params.get());
int tab_id = params->details.tab_id;
- result_.reset(Value::CreateNullValue());
+ SetSingleResult(Value::CreateNullValue());
TabContents* tab_contents;
if (!ExtensionTabUtil::GetTabById(tab_id,
@@ -870,7 +870,7 @@ bool GetAllFramesFunction::RunImpl() {
frame->error_occurred = navigation_state.GetErrorOccurredInFrame(frame_id);
result_list.push_back(frame);
}
- result_.reset(GetAllFrames::Result::Create(result_list));
+ SetSingleResult(GetAllFrames::Result::Create(result_list));
return true;
}

Powered by Google App Engine
This is Rietveld 408576698