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

Side by Side Diff: components/offline_pages/core/offline_page_model.h

Issue 2858803002: [Offline Pages] Adding support for removed-on-cache-reset pages to query. (Closed)
Patch Set: Fixing tests. Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_CORE_OFFLINE_PAGE_MODEL_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_MODEL_H_
6 #define COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_MODEL_H_ 6 #define COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_MODEL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 virtual void MarkPageAccessed(int64_t offline_id) = 0; 124 virtual void MarkPageAccessed(int64_t offline_id) = 0;
125 125
126 // Deletes pages based on |offline_ids|. 126 // Deletes pages based on |offline_ids|.
127 virtual void DeletePagesByOfflineId(const std::vector<int64_t>& offline_ids, 127 virtual void DeletePagesByOfflineId(const std::vector<int64_t>& offline_ids,
128 const DeletePageCallback& callback) = 0; 128 const DeletePageCallback& callback) = 0;
129 129
130 // Deletes all pages associated with any of |client_ids|. 130 // Deletes all pages associated with any of |client_ids|.
131 virtual void DeletePagesByClientIds(const std::vector<ClientId>& client_ids, 131 virtual void DeletePagesByClientIds(const std::vector<ClientId>& client_ids,
132 const DeletePageCallback& callback) = 0; 132 const DeletePageCallback& callback) = 0;
133 133
134 // Deletes all pages matching |query|.
135 virtual void DeletePagesMatchingQuery(
dewittj 2017/05/03 21:55:09 I wonder if we shouldn't make it so easy :) and ma
romax 2017/05/03 23:23:08 Can't agree more! I've removed this method since t
136 std::unique_ptr<OfflinePageModelQuery> query,
137 const DeletePageCallback& callback) = 0;
138
139 // Retrieves all pages matching |query|.
134 virtual void GetPagesMatchingQuery( 140 virtual void GetPagesMatchingQuery(
135 std::unique_ptr<OfflinePageModelQuery> query, 141 std::unique_ptr<OfflinePageModelQuery> query,
136 const MultipleOfflinePageItemCallback& callback) = 0; 142 const MultipleOfflinePageItemCallback& callback) = 0;
137 143
138 // Retrieves all pages associated with any of |client_ids|. 144 // Retrieves all pages associated with any of |client_ids|.
139 virtual void GetPagesByClientIds( 145 virtual void GetPagesByClientIds(
140 const std::vector<ClientId>& client_ids, 146 const std::vector<ClientId>& client_ids,
141 const MultipleOfflinePageItemCallback& callback) = 0; 147 const MultipleOfflinePageItemCallback& callback) = 0;
142 148
143 // Deletes cached offline pages matching the URL predicate. 149 // Deletes cached offline pages matching the URL predicate.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 // TODO(dougarnett): Remove this and its uses. 183 // TODO(dougarnett): Remove this and its uses.
178 virtual bool is_loaded() const = 0; 184 virtual bool is_loaded() const = 0;
179 185
180 // Returns the logger. Ownership is retained by the model. 186 // Returns the logger. Ownership is retained by the model.
181 virtual OfflineEventLogger* GetLogger() = 0; 187 virtual OfflineEventLogger* GetLogger() = 0;
182 }; 188 };
183 189
184 } // namespace offline_pages 190 } // namespace offline_pages
185 191
186 #endif // COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_MODEL_H_ 192 #endif // COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698