Chromium Code Reviews| Index: chrome/browser/android/offline_pages/offline_page_utils.h |
| diff --git a/chrome/browser/android/offline_pages/offline_page_utils.h b/chrome/browser/android/offline_pages/offline_page_utils.h |
| index bdda54ae7f933e397760110f0b1c243eb8e0db7c..ce349a94fbd59d48725df8d109ed75dea53e59d1 100644 |
| --- a/chrome/browser/android/offline_pages/offline_page_utils.h |
| +++ b/chrome/browser/android/offline_pages/offline_page_utils.h |
| @@ -13,6 +13,7 @@ class GURL; |
| namespace content { |
| class BrowserContext; |
| +class WebContents; |
| } |
| namespace offline_pages { |
| @@ -53,6 +54,12 @@ class OfflinePageUtils { |
| // Marks that the offline page related to the |offline_url| has been accessed. |
| static void MarkPageAccessed(content::BrowserContext* browser_context, |
| const GURL& offline_url); |
| + |
| + // Gets the offline page corresponding to the given web contents. The |
| + // returned pointer is owned by the web_contents and may be deleted by user |
| + // navigation, so it is unsafe to store a copy of the returned pointer. |
| + static const OfflinePageItem* GetCurrentOfflinePage( |
|
jianli
2016/06/15 00:44:00
nit: GetOfflinePageFromWebContents
dewittj
2016/06/15 17:21:05
Done.
|
| + content::WebContents* web_contents); |
| }; |
| } // namespace offline_pages |