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

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: 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/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 82fe920c80c7217b6126fac03f45f1dc1834f97d..ebd484ae11b65bc6c78a5ba90b29bdeeeb12a6a6 100644
--- a/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc
+++ b/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc
@@ -724,7 +724,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,
@@ -758,7 +758,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;
}
@@ -767,7 +767,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,
@@ -803,7 +803,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