diff options
author | arv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-21 23:30:15 +0000 |
---|---|---|
committer | arv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-21 23:30:15 +0000 |
commit | 438c97d23785f28465304e1cb521b5125e9ea469 (patch) | |
tree | 5bc5c6ae6c72b9c8567c13a0b32d491b25e81f88 /chrome/browser/extensions/extension_cookies_api.cc | |
parent | 69e297f187425f2b31db37bfe51af86f28c38275 (diff) | |
download | chromium_src-438c97d23785f28465304e1cb521b5125e9ea469.zip chromium_src-438c97d23785f28465304e1cb521b5125e9ea469.tar.gz chromium_src-438c97d23785f28465304e1cb521b5125e9ea469.tar.bz2 |
Update extension functions to always pass a list of arguments, even when one argument was passed.
BUG=36301
TEST=Updated tests and ran all the existing tests.
Review URL: http://codereview.chromium.org/2137012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47972 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_cookies_api.cc')
-rw-r--r-- | chrome/browser/extensions/extension_cookies_api.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/chrome/browser/extensions/extension_cookies_api.cc b/chrome/browser/extensions/extension_cookies_api.cc index c9c2d09..05415cf 100644 --- a/chrome/browser/extensions/extension_cookies_api.cc +++ b/chrome/browser/extensions/extension_cookies_api.cc @@ -62,8 +62,8 @@ bool CookiesFunction::ParseCookieStore(const DictionaryValue* details, } bool GetCookieFunction::RunImpl() { - EXTENSION_FUNCTION_VALIDATE(args_->IsType(Value::TYPE_DICTIONARY)); - const DictionaryValue* details = args_as_dictionary(); + DictionaryValue* details; + EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &details)); DCHECK(details); // Read/validate input parameters. @@ -103,8 +103,8 @@ bool GetCookieFunction::RunImpl() { } bool GetAllCookiesFunction::RunImpl() { - EXTENSION_FUNCTION_VALIDATE(args_->IsType(Value::TYPE_DICTIONARY)); - const DictionaryValue* details = args_as_dictionary(); + DictionaryValue* details; + EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &details)); // Read/validate input parameters. GURL url; @@ -125,8 +125,8 @@ bool GetAllCookiesFunction::RunImpl() { } bool SetCookieFunction::RunImpl() { - EXTENSION_FUNCTION_VALIDATE(args_->IsType(Value::TYPE_DICTIONARY)); - const DictionaryValue* details = args_as_dictionary(); + DictionaryValue* details; + EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &details)); // Read/validate input parameters. GURL url; @@ -195,8 +195,8 @@ bool SetCookieFunction::RunImpl() { } bool RemoveCookieFunction::RunImpl() { - EXTENSION_FUNCTION_VALIDATE(args_->IsType(Value::TYPE_DICTIONARY)); - const DictionaryValue* details = args_as_dictionary(); + DictionaryValue* details; + EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &details)); // Read/validate input parameters. GURL url; |