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

Unified Diff: components/offline_pages/offline_page_storage_manager.cc

Issue 2004993002: add a couple of casts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments. Created 4 years, 7 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
« no previous file with comments | « components/offline_pages/offline_page_model.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/offline_pages/offline_page_storage_manager.cc
diff --git a/components/offline_pages/offline_page_storage_manager.cc b/components/offline_pages/offline_page_storage_manager.cc
index 266615b00b6536a1780d997541abcc61ec65c6b9..794bec743a53039dc339b7cfdf855ce28ce31edb 100644
--- a/components/offline_pages/offline_page_storage_manager.cc
+++ b/components/offline_pages/offline_page_storage_manager.cc
@@ -66,9 +66,9 @@ void OfflinePageStorageManager::OnGetAllPagesDone(
std::vector<int64_t> offline_ids;
GetExpiredPageIds(pages, stats, offline_ids);
client_->DeletePagesByOfflineId(
- offline_ids,
- base::Bind(&OfflinePageStorageManager::OnExpiredPagesDeleted,
- weak_ptr_factory_.GetWeakPtr(), callback, offline_ids.size()));
+ offline_ids, base::Bind(&OfflinePageStorageManager::OnExpiredPagesDeleted,
+ weak_ptr_factory_.GetWeakPtr(), callback,
+ static_cast<int>(offline_ids.size())));
}
void OfflinePageStorageManager::OnExpiredPagesDeleted(
@@ -112,7 +112,7 @@ void OfflinePageStorageManager::GetExpiredPageIds(
return a.last_access_time > b.last_access_time;
});
- int page_list_size = page_list.size();
+ int page_list_size = static_cast<int>(page_list.size());
int pos = 0;
while (pos < page_list_size &&
(policy.page_limit == kUnlimitedPages || pos < policy.page_limit) &&
@@ -139,7 +139,7 @@ void OfflinePageStorageManager::GetExpiredPageIds(
[](const OfflinePageItem& a, const OfflinePageItem& b) -> bool {
return a.last_access_time < b.last_access_time;
});
- int kept_pages_size = kept_pages.size();
+ int kept_pages_size = static_cast<int>(kept_pages.size());
int pos = 0;
while (pos < kept_pages_size && space_to_release > 0) {
space_to_release -= kept_pages.at(pos).file_size;
« no previous file with comments | « components/offline_pages/offline_page_model.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698