Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 153 // Gets all offline ids where the offline page has the matching client id. | 153 // Gets all offline ids where the offline page has the matching client id. |
| 154 virtual void GetOfflineIdsForClientId( | 154 virtual void GetOfflineIdsForClientId( |
| 155 const ClientId& client_id, | 155 const ClientId& client_id, |
| 156 const MultipleOfflineIdCallback& callback) = 0; | 156 const MultipleOfflineIdCallback& callback) = 0; |
| 157 | 157 |
| 158 // Returns zero or one offline pages associated with a specified |offline_id|. | 158 // Returns zero or one offline pages associated with a specified |offline_id|. |
| 159 virtual void GetPageByOfflineId( | 159 virtual void GetPageByOfflineId( |
| 160 int64_t offline_id, | 160 int64_t offline_id, |
| 161 const SingleOfflinePageItemCallback& callback) = 0; | 161 const SingleOfflinePageItemCallback& callback) = 0; |
| 162 | 162 |
| 163 // Returns the offline pages that are stored under |online_url|. | 163 // Returns the offline pages that are associated with |url|. If |
| 164 virtual void GetPagesByOnlineURL( | 164 // |search_by_final_url_only| is false, do the match using last committed |
| 165 const GURL& online_url, | 165 // URLs. Otherwise, either original URLs or last committed URLs coule be used |
| 166 // for the match. | |
| 167 virtual void GetPagesByURL( | |
| 168 const GURL& url, | |
| 169 bool search_by_final_url_only, | |
|
fgorski
2016/11/16 23:43:46
enum here would be good too.
jianli
2016/11/17 01:12:14
Done.
| |
| 166 const MultipleOfflinePageItemCallback& callback) = 0; | 170 const MultipleOfflinePageItemCallback& callback) = 0; |
| 167 | 171 |
| 168 // Marks pages with |offline_ids| as expired and deletes the associated | 172 // Marks pages with |offline_ids| as expired and deletes the associated |
| 169 // archive files. | 173 // archive files. |
| 170 virtual void ExpirePages(const std::vector<int64_t>& offline_ids, | 174 virtual void ExpirePages(const std::vector<int64_t>& offline_ids, |
| 171 const base::Time& expiration_time, | 175 const base::Time& expiration_time, |
| 172 const base::Callback<void(bool)>& callback) = 0; | 176 const base::Callback<void(bool)>& callback) = 0; |
| 173 | 177 |
| 174 // Returns the policy controller. | 178 // Returns the policy controller. |
| 175 virtual ClientPolicyController* GetPolicyController() = 0; | 179 virtual ClientPolicyController* GetPolicyController() = 0; |
| 176 | 180 |
| 177 // TODO(dougarnett): Remove this and its uses. | 181 // TODO(dougarnett): Remove this and its uses. |
| 178 virtual bool is_loaded() const = 0; | 182 virtual bool is_loaded() const = 0; |
| 179 | 183 |
| 180 // Returns the logger. Ownership is retained by the model. | 184 // Returns the logger. Ownership is retained by the model. |
| 181 virtual OfflineEventLogger* GetLogger() = 0; | 185 virtual OfflineEventLogger* GetLogger() = 0; |
| 182 }; | 186 }; |
| 183 | 187 |
| 184 } // namespace offline_pages | 188 } // namespace offline_pages |
| 185 | 189 |
| 186 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_H_ | 190 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_H_ |
| OLD | NEW |