Index: chrome/browser/android/offline_pages/offline_page_tab_helper.h |
diff --git a/chrome/browser/android/offline_pages/offline_page_tab_helper.h b/chrome/browser/android/offline_pages/offline_page_tab_helper.h |
index 392213d24c74f0eb299302f485009698583bc971..717dc040cff622a34d46e70551e9cb2f7cf8758d 100644 |
--- a/chrome/browser/android/offline_pages/offline_page_tab_helper.h |
+++ b/chrome/browser/android/offline_pages/offline_page_tab_helper.h |
@@ -35,6 +35,10 @@ class OfflinePageTabHelper : |
// Whether the page is an offline preview. |
bool is_offline_preview() const { return is_offline_preview_; } |
+ // Returns provisional offline page since actual navigation does not happen |
+ // during unit tests. |
+ const OfflinePageItem* GetOfflinePageForTest() const; |
+ |
private: |
friend class content::WebContentsUserData<OfflinePageTabHelper>; |
@@ -52,6 +56,11 @@ class OfflinePageTabHelper : |
// tab. This can be used to by the Tab to synchronously ask about the offline |
// info. |
std::unique_ptr<OfflinePageItem> offline_page_; |
+ // Potential new offline page copy. This is reset to nullptr at the start |
+ // of every navigation and set by network request interceptor. If the |
+ // interceptor decided to not use offline page for the navigation or was not |
+ // even invoked (as in case with fragment navigation), this stays nullptr. |
+ std::unique_ptr<OfflinePageItem> provisional_offline_page_; |
bool reloading_url_on_net_error_ = false; |