Index: components/history/core/browser/history_backend.cc |
diff --git a/components/history/core/browser/history_backend.cc b/components/history/core/browser/history_backend.cc |
index ad61094c5702e56dddce0ef178a7d0071ac5969f..19836b7f168bc448937a19d2e08d1a76e0c6ff70 100644 |
--- a/components/history/core/browser/history_backend.cc |
+++ b/components/history/core/browser/history_backend.cc |
@@ -1367,7 +1367,8 @@ void HistoryBackend::QueryFilteredURLs(int result_count, |
// Limit to the top |result_count| results. |
std::sort(data.begin(), data.end(), PageUsageData::Predicate); |
- if (result_count && implicit_cast<int>(data.size()) > result_count) |
+ DCHECK_GE(result_count, 0); |
+ if (result_count && data.size() > static_cast<size_t>(result_count)) |
data.resize(result_count); |
for (size_t i = 0; i < data.size(); ++i) { |