summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-22 04:01:34 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-22 04:01:34 +0000
commit2ce680b238e4a7d848b9bd05bb228d8da5ff2a9d (patch)
tree43dcbfb71bbde0ffe9935910582882631a77c42d
parentc6956e2007b7268a814d49c1cbb375a9952b12cb (diff)
downloadchromium_src-2ce680b238e4a7d848b9bd05bb228d8da5ff2a9d.zip
chromium_src-2ce680b238e4a7d848b9bd05bb228d8da5ff2a9d.tar.gz
chromium_src-2ce680b238e4a7d848b9bd05bb228d8da5ff2a9d.tar.bz2
Coverity: Add a couple return checks to TestingAutomationProvider.
BUG=none TEST=none CID=12868,12872 Review URL: http://codereview.chromium.org/7219017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89974 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/automation/testing_automation_provider.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index 29ec1c3..7096da1 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -3480,7 +3480,7 @@ webkit_glue::PasswordForm GetPasswordFormFromDict(
string16 password_element;
string16 submit_element;
string16 action_target_text;
- bool blacklist = false;
+ bool blacklist;
string16 old_password_element;
string16 old_password_value;
@@ -3494,7 +3494,8 @@ webkit_glue::PasswordForm GetPasswordFormFromDict(
password_dict.GetString("password_element", &password_element);
password_dict.GetString("submit_element", &submit_element);
password_dict.GetString("action_target", &action_target_text);
- password_dict.GetBoolean("blacklist", &blacklist);
+ if (!password_dict.GetBoolean("blacklist", &blacklist))
+ blacklist = false;
GURL origin_gurl(origin_url_text);
GURL action_target(action_target_text);
@@ -4679,7 +4680,8 @@ std::vector<CreditCard> TestingAutomationProvider::GetCreditCardsFromList(
int num_credit_cards = cards.GetSize();
for (int i = 0; i < num_credit_cards; i++) {
- cards.GetDictionary(i, &card_info);
+ if (!cards.GetDictionary(i, &card_info))
+ continue;
CreditCard card;
// Loop through the possible credit card fields and add those provided.
for (std::map<AutofillFieldType, std::string>::iterator type_it =