summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation
diff options
context:
space:
mode:
authorgroby@chromium.org <groby@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-22 19:25:08 +0000
committergroby@chromium.org <groby@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-22 19:25:08 +0000
commit4541c7e3b14ba45bc81d7dcf7ff6a05f587233b5 (patch)
tree640d0f6164f6bb943fadb0fe0f49b299a393cb88 /chrome/browser/automation
parent94325fcae6cd3783276024a02f6ce30daa169597 (diff)
downloadchromium_src-4541c7e3b14ba45bc81d7dcf7ff6a05f587233b5.zip
chromium_src-4541c7e3b14ba45bc81d7dcf7ff6a05f587233b5.tar.gz
chromium_src-4541c7e3b14ba45bc81d7dcf7ff6a05f587233b5.tar.bz2
Coverity fixes for CHECKED_RETURN
CID=16094,12870,12867,12738,12649 R=vandebo@chromium.org BUG=none TEST=none Review URL: http://codereview.chromium.org/7218028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90068 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation')
-rw-r--r--chrome/browser/automation/testing_automation_provider.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index 7096da1..abde491 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -3440,9 +3440,9 @@ void TestingAutomationProvider::ImportSettings(Browser* browser,
int num_items = import_items_list->GetSize();
for (int i = 0; i < num_items; i++) {
std::string item;
- import_items_list->GetString(i, &item);
// If the provided string is not part of the map, error out.
- if (!ContainsKey(string_to_import_item, item)) {
+ if (!import_items_list->GetString(i, &item) ||
+ !ContainsKey(string_to_import_item, item)) {
AutomationJSONReply(this, reply_message)
.SendError("Invalid item string found in import_items.");
return;
@@ -3663,9 +3663,9 @@ void TestingAutomationProvider::ClearBrowsingData(
int num_removals = to_remove->GetSize();
for (int i = 0; i < num_removals; i++) {
std::string removal;
- to_remove->GetString(i, &removal);
// If the provided string is not part of the map, then error out.
- if (!ContainsKey(string_to_mask_value, removal)) {
+ if (!to_remove->GetString(i, &removal) ||
+ !ContainsKey(string_to_mask_value, removal)) {
AutomationJSONReply(this, reply_message)
.SendError("Invalid browsing data string found in to_remove.");
return;