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

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

Issue 2275833002: [Offline Pages] Don't remove user-requested pages when deleting cache. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments. Created 4 years, 4 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_OFFLINE_PAGE_MODEL_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_H_
6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_H_ 6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // will be updated. Requires that the model is loaded. 96 // will be updated. Requires that the model is loaded.
97 virtual void MarkPageAccessed(int64_t offline_id) = 0; 97 virtual void MarkPageAccessed(int64_t offline_id) = 0;
98 98
99 // Wipes out all the data by deleting all saved files and clearing the store. 99 // Wipes out all the data by deleting all saved files and clearing the store.
100 virtual void ClearAll(const base::Closure& callback) = 0; 100 virtual void ClearAll(const base::Closure& callback) = 0;
101 101
102 // Deletes pages based on |offline_ids|. 102 // Deletes pages based on |offline_ids|.
103 virtual void DeletePagesByOfflineId(const std::vector<int64_t>& offline_ids, 103 virtual void DeletePagesByOfflineId(const std::vector<int64_t>& offline_ids,
104 const DeletePageCallback& callback) = 0; 104 const DeletePageCallback& callback) = 0;
105 105
106 // Deletes offline pages matching the URL predicate. 106 // Deletes cached offline pages matching the URL predicate.
107 virtual void DeletePagesByURLPredicate( 107 virtual void DeleteCachedPagesByURLPredicate(
108 const UrlPredicate& predicate, 108 const UrlPredicate& predicate,
109 const DeletePageCallback& callback) = 0; 109 const DeletePageCallback& callback) = 0;
110 110
111 // Returns true via callback if there are offline pages in the given 111 // Returns true via callback if there are offline pages in the given
112 // |name_space|. 112 // |name_space|.
113 virtual void HasPages(const std::string& name_space, 113 virtual void HasPages(const std::string& name_space,
114 const HasPagesCallback& callback) = 0; 114 const HasPagesCallback& callback) = 0;
115 115
116 // Returns via callback all GURLs in |urls| that are equal to the online URL 116 // Returns via callback all GURLs in |urls| that are equal to the online URL
117 // of any offline page. 117 // of any offline page.
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 // TODO(dougarnett): Remove this and its uses. 192 // TODO(dougarnett): Remove this and its uses.
193 virtual bool is_loaded() const = 0; 193 virtual bool is_loaded() const = 0;
194 194
195 // Returns the logger. Ownership is retained by the model. 195 // Returns the logger. Ownership is retained by the model.
196 virtual OfflineEventLogger* GetLogger() = 0; 196 virtual OfflineEventLogger* GetLogger() = 0;
197 }; 197 };
198 198
199 } // namespace offline_pages 199 } // namespace offline_pages
200 200
201 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_H_ 201 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data/browsing_data_remover.cc ('k') | components/offline_pages/offline_page_model_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698