| Index: components/offline_pages/offline_page_model.h
|
| diff --git a/components/offline_pages/offline_page_model.h b/components/offline_pages/offline_page_model.h
|
| index 272f6dc9c0cfe2744853758c7dca29c5b62b6a4c..5eb2cba101a33f482e921869bda0cf1c5a211452 100644
|
| --- a/components/offline_pages/offline_page_model.h
|
| +++ b/components/offline_pages/offline_page_model.h
|
| @@ -48,6 +48,15 @@ struct OfflinePageItem;
|
| // * how to cancel requests and what to expect
|
| class OfflinePageModel : public base::SupportsUserData {
|
| public:
|
| + // Controls how to search on differnt URLs for pages.
|
| + enum class URLSearchMode {
|
| + // Match against the last committed URL only.
|
| + SEARCH_BY_FINAL_URL_ONLY,
|
| + // Match against all stored URLs, including the last committed URL and
|
| + // the original request URL.
|
| + SEARCH_BY_ALL_URLS
|
| + };
|
| +
|
| // Describes the parameters to control how to save a page.
|
| struct SavePageParams {
|
| SavePageParams();
|
| @@ -160,9 +169,11 @@ class OfflinePageModel : public base::SupportsUserData {
|
| int64_t offline_id,
|
| const SingleOfflinePageItemCallback& callback) = 0;
|
|
|
| - // Returns the offline pages that are stored under |online_url|.
|
| - virtual void GetPagesByOnlineURL(
|
| - const GURL& online_url,
|
| + // Returns the offline pages that are related to |url|. |url_search_mode|
|
| + // controls how the url match is done. See URLSearchMode for more details.
|
| + virtual void GetPagesByURL(
|
| + const GURL& url,
|
| + URLSearchMode url_search_mode,
|
| const MultipleOfflinePageItemCallback& callback) = 0;
|
|
|
| // Marks pages with |offline_ids| as expired and deletes the associated
|
|
|