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

Unified Diff: chrome/browser/safe_browsing/client_side_detection_host.cc

Issue 313073002: Clean-up coding style (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase the branch Created 6 years, 6 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: chrome/browser/safe_browsing/client_side_detection_host.cc
diff --git a/chrome/browser/safe_browsing/client_side_detection_host.cc b/chrome/browser/safe_browsing/client_side_detection_host.cc
index ad77670bb51577e35a07f91876f5db9cf902cd81..83e3d542bc2157719eec05c7897e9776ea222c8d 100644
--- a/chrome/browser/safe_browsing/client_side_detection_host.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_host.cc
@@ -44,8 +44,8 @@ using content::WebContents;
namespace safe_browsing {
-const int ClientSideDetectionHost::kMaxUrlsPerIP = 20;
-const int ClientSideDetectionHost::kMaxIPsPerBrowse = 200;
+const size_t ClientSideDetectionHost::kMaxUrlsPerIP = 20;
+const size_t ClientSideDetectionHost::kMaxIPsPerBrowse = 200;
const char kSafeBrowsingMatchKey[] = "safe_browsing_match";
@@ -688,12 +688,12 @@ void ClientSideDetectionHost::UpdateIPUrlMap(
IPUrlMap::iterator it = browse_info_->ips.find(ip);
if (it == browse_info_->ips.end()) {
- if (int(browse_info_->ips.size()) < kMaxIPsPerBrowse) {
+ if (browse_info_->ips.size() < kMaxIPsPerBrowse) {
std::vector<IPUrlInfo> url_infos;
url_infos.push_back(IPUrlInfo(url, method, referrer, resource_type));
browse_info_->ips.insert(make_pair(ip, url_infos));
}
- } else if (int(it->second.size()) < kMaxUrlsPerIP) {
+ } else if (it->second.size() < kMaxUrlsPerIP) {
it->second.push_back(IPUrlInfo(url, method, referrer, resource_type));
}
}

Powered by Google App Engine
This is Rietveld 408576698