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

Unified Diff: components/safe_browsing_db/v4_database.cc

Issue 2683813002: Part 3: Browser tests for calling client methods Check*Url with PVer4 (Closed)
Patch Set: Added comments for clarity Created 3 years, 10 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: components/safe_browsing_db/v4_database.cc
diff --git a/components/safe_browsing_db/v4_database.cc b/components/safe_browsing_db/v4_database.cc
index 53035fc40e23a00ee71c6981dbb353672600cb30..343e85ae02459783f0d7079a29340ec1d2026a38 100644
--- a/components/safe_browsing_db/v4_database.cc
+++ b/components/safe_browsing_db/v4_database.cc
@@ -217,10 +217,12 @@ bool V4Database::AreStoresAvailable(
DCHECK_CURRENTLY_ON(BrowserThread::IO);
for (const ListIdentifier& identifier : stores_to_check) {
const auto& store_pair = store_map_->find(identifier);
- if (store_pair == store_map_->end())
+ if (store_pair == store_map_->end()) {
return false; // Store not in our list
- if (!store_pair->second->HasValidData())
+ }
+ if (!store_pair->second->HasValidData()) {
return false; // Store never properly populated.
+ }
}
return true;
}

Powered by Google App Engine
This is Rietveld 408576698