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

Unified Diff: components/offline_pages/offline_page_model_impl.cc

Issue 2336973005: [Offline Pages] Removes the unused "HasPages" function. (Closed)
Patch Set: Created 4 years, 3 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/offline_pages/offline_page_model_impl.cc
diff --git a/components/offline_pages/offline_page_model_impl.cc b/components/offline_pages/offline_page_model_impl.cc
index 7146ebf774d936ef398b38073c748627549d8501..aa58ee8d9abee53bd525e7cdb50f6ea07f390fa1 100644
--- a/components/offline_pages/offline_page_model_impl.cc
+++ b/components/offline_pages/offline_page_model_impl.cc
@@ -478,31 +478,6 @@ void OfflinePageModelImpl::DoDeleteCachedPagesByURLPredicate(
DoDeletePagesByOfflineId(offline_ids, callback);
}
-void OfflinePageModelImpl::HasPages(const std::string& name_space,
- const HasPagesCallback& callback) {
- RunWhenLoaded(base::Bind(&OfflinePageModelImpl::HasPagesAfterLoadDone,
- weak_ptr_factory_.GetWeakPtr(), name_space,
- callback));
-}
-
-void OfflinePageModelImpl::HasPagesAfterLoadDone(
- const std::string& name_space,
- const HasPagesCallback& callback) const {
- DCHECK(is_loaded_);
-
- bool has_pages = false;
-
- for (const auto& id_page_pair : offline_pages_) {
- if (id_page_pair.second.client_id.name_space == name_space &&
- !id_page_pair.second.IsExpired()) {
- has_pages = true;
- break;
- }
- }
-
- callback.Run(has_pages);
-}
-
void OfflinePageModelImpl::CheckPagesExistOffline(
const std::set<GURL>& urls,
const CheckPagesExistOfflineCallback& callback) {
« no previous file with comments | « components/offline_pages/offline_page_model_impl.h ('k') | components/offline_pages/offline_page_model_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698