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

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

Issue 8631017: Change the first parameter of savePage.saveAsMHTML to be a dictionary. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reverted test change. Created 9 years, 1 month 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_save_page_api.cc
diff --git a/chrome/browser/extensions/extension_save_page_api.cc b/chrome/browser/extensions/extension_save_page_api.cc
index 2a934b2b73924af140285b7f9d857d5dc6f3d111..97f52707430e9898d00ee3844a5308e636c15a07 100644
--- a/chrome/browser/extensions/extension_save_page_api.cc
+++ b/chrome/browser/extensions/extension_save_page_api.cc
@@ -33,7 +33,13 @@ SavePageAsMHTMLFunction::~SavePageAsMHTMLFunction() {
}
bool SavePageAsMHTMLFunction::RunImpl() {
- EXTENSION_FUNCTION_VALIDATE(args_->GetInteger(0, &tab_id_));
+ DictionaryValue* args;
+ EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &args));
+
+ if (!args->HasKey("tabId"))
+ return false;
+
+ EXTENSION_FUNCTION_VALIDATE(args->GetInteger("tabId", &tab_id_));
AddRef(); // Balanced in ReturnFailure/ReturnSuccess()
« no previous file with comments | « no previous file | chrome/common/extensions/api/extension_api.json » ('j') | chrome/common/extensions/api/extension_api.json » ('J')

Powered by Google App Engine
This is Rietveld 408576698