Chromium Code Reviews| Index: ios/chrome/browser/reading_list/offline_url_utils.h |
| diff --git a/ios/chrome/browser/reading_list/offline_url_utils.h b/ios/chrome/browser/reading_list/offline_url_utils.h |
| index d7af133b49e0e8f24e29d7bcecd2c71dbe3d10f7..d8782c7966f80c2b08fd6f4cdb4ffc729086a6eb 100644 |
| --- a/ios/chrome/browser/reading_list/offline_url_utils.h |
| +++ b/ios/chrome/browser/reading_list/offline_url_utils.h |
| @@ -11,23 +11,26 @@ |
| #include "base/strings/string16.h" |
| #include "url/gurl.h" |
| +class ReadingListModel; |
| + |
| namespace reading_list { |
| // The distilled URL chrome://offline/... that will load the file at |path|. |
| // |entry_url| is the URL of the ReadingListEntry. |
| // |virtual_url| is the URL to display in the omnibox. This can be different |
| // from |entry_url| is the distillation was done after a redirection. |
|
jif
2017/04/05 13:19:32
s/is/if/
Olivier
2017/04/05 14:30:53
Done.
|
| -// |entry_url| and |virtual_url| are optionnal. |
| +// |distilled_path|, |entry_url| and |virtual_url| are required and cannot be |
|
jif
2017/04/05 13:19:32
s/cannot/must not/
Olivier
2017/04/05 14:30:53
Done.
|
| +// empty or invalid. |
| GURL OfflineURLForPath(const base::FilePath& distilled_path, |
| const GURL& entry_url, |
| const GURL& virtual_url); |
| // If |offline_url| has a "entryURL" query params that is a URL, returns it. |
| -// If not, return |offline_url| |
| +// If not, return GURL::EmptyURL(). |
| GURL EntryURLForOfflineURL(const GURL& offline_url); |
| // If |offline_url| has a "virtualURL" query params that is a URL, returns it. |
| -// If not, return |EntryURLForOfflineURL(|offline_url|)| |
| +// If not, return GURL::EmptyURL(). |
| GURL VirtualURLForOfflineURL(const GURL& offline_url); |
| // The file URL pointing to the local file to load to display |distilled_url|. |
| @@ -41,6 +44,10 @@ GURL FileURLForDistilledURL(const GURL& distilled_url, |
| // Returns whether the URL points to a chrome offline URL. |
| bool IsOfflineURL(const GURL& url); |
| +// Returns whether the URL points to a valid chrome offline URL that can be |
| +// displayed by a |OfflinePageNativeContent|. |
| +bool IsOfflineURLValid(const GURL& url, ReadingListModel* model); |
| + |
| } // namespace reading_list |
| #endif // IOS_CHROME_BROWSER_READING_LIST_OFFLINE_URL_UTILS_H_ |