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

Side by Side Diff: components/offline_pages/offline_page_model_impl.h

Issue 2142703002: [Offline Pages] Showing expired pages in internal page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_
6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_ 6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 void DeletePagesByOfflineId(const std::vector<int64_t>& offline_ids, 74 void DeletePagesByOfflineId(const std::vector<int64_t>& offline_ids,
75 const DeletePageCallback& callback) override; 75 const DeletePageCallback& callback) override;
76 void DeletePagesByURLPredicate(const UrlPredicate& predicate, 76 void DeletePagesByURLPredicate(const UrlPredicate& predicate,
77 const DeletePageCallback& callback) override; 77 const DeletePageCallback& callback) override;
78 void HasPages(const std::string& name_space, 78 void HasPages(const std::string& name_space,
79 const HasPagesCallback& callback) override; 79 const HasPagesCallback& callback) override;
80 void CheckPagesExistOffline( 80 void CheckPagesExistOffline(
81 const std::set<GURL>& urls, 81 const std::set<GURL>& urls,
82 const CheckPagesExistOfflineCallback& callback) override; 82 const CheckPagesExistOfflineCallback& callback) override;
83 void GetAllPages(const MultipleOfflinePageItemCallback& callback) override; 83 void GetAllPages(const MultipleOfflinePageItemCallback& callback) override;
84 void GetAllPagesWithExpired(
85 const MultipleOfflinePageItemCallback& callback) override;
84 void GetOfflineIdsForClientId( 86 void GetOfflineIdsForClientId(
85 const ClientId& client_id, 87 const ClientId& client_id,
86 const MultipleOfflineIdCallback& callback) override; 88 const MultipleOfflineIdCallback& callback) override;
87 const std::vector<int64_t> MaybeGetOfflineIdsForClientId( 89 const std::vector<int64_t> MaybeGetOfflineIdsForClientId(
88 const ClientId& client_id) const override; 90 const ClientId& client_id) const override;
89 void GetPageByOfflineId( 91 void GetPageByOfflineId(
90 int64_t offline_id, 92 int64_t offline_id,
91 const SingleOfflinePageItemCallback& callback) override; 93 const SingleOfflinePageItemCallback& callback) override;
92 const OfflinePageItem* MaybeGetPageByOfflineId( 94 const OfflinePageItem* MaybeGetPageByOfflineId(
93 int64_t offline_id) const override; 95 int64_t offline_id) const override;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 128
127 private: 129 private:
128 FRIEND_TEST_ALL_PREFIXES(OfflinePageModelImplTest, MarkPageForDeletion); 130 FRIEND_TEST_ALL_PREFIXES(OfflinePageModelImplTest, MarkPageForDeletion);
129 131
130 typedef ScopedVector<OfflinePageArchiver> PendingArchivers; 132 typedef ScopedVector<OfflinePageArchiver> PendingArchivers;
131 133
132 // Callback for ensuring archive directory is created. 134 // Callback for ensuring archive directory is created.
133 void OnEnsureArchivesDirCreatedDone(const base::TimeTicks& start_time); 135 void OnEnsureArchivesDirCreatedDone(const base::TimeTicks& start_time);
134 136
135 void GetAllPagesAfterLoadDone( 137 void GetAllPagesAfterLoadDone(
138 bool with_expired,
136 const MultipleOfflinePageItemCallback& callback) const; 139 const MultipleOfflinePageItemCallback& callback) const;
137 void CheckPagesExistOfflineAfterLoadDone( 140 void CheckPagesExistOfflineAfterLoadDone(
138 const std::set<GURL>& urls, 141 const std::set<GURL>& urls,
139 const CheckPagesExistOfflineCallback& callback); 142 const CheckPagesExistOfflineCallback& callback);
140 void GetOfflineIdsForClientIdWhenLoadDone( 143 void GetOfflineIdsForClientIdWhenLoadDone(
141 const ClientId& client_id, 144 const ClientId& client_id,
142 const MultipleOfflineIdCallback& callback) const; 145 const MultipleOfflineIdCallback& callback) const;
143 void GetPageByOfflineIdWhenLoadDone( 146 void GetPageByOfflineIdWhenLoadDone(
144 int64_t offline_id, 147 int64_t offline_id,
145 const SingleOfflinePageItemCallback& callback) const; 148 const SingleOfflinePageItemCallback& callback) const;
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 OfflinePageModelEventLogger offline_event_logger_; 295 OfflinePageModelEventLogger offline_event_logger_;
293 296
294 base::WeakPtrFactory<OfflinePageModelImpl> weak_ptr_factory_; 297 base::WeakPtrFactory<OfflinePageModelImpl> weak_ptr_factory_;
295 298
296 DISALLOW_COPY_AND_ASSIGN(OfflinePageModelImpl); 299 DISALLOW_COPY_AND_ASSIGN(OfflinePageModelImpl);
297 }; 300 };
298 301
299 } // namespace offline_pages 302 } // namespace offline_pages
300 303
301 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_ 304 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698