| Index: chrome/browser/android/offline_pages/offline_page_utils.cc
|
| diff --git a/chrome/browser/android/offline_pages/offline_page_utils.cc b/chrome/browser/android/offline_pages/offline_page_utils.cc
|
| index 1f06a44459557725bfa8bf96ba82a262bb5b5766..07ebb1bbc3b8439c85205e276354cecebd3ebb3e 100644
|
| --- a/chrome/browser/android/offline_pages/offline_page_utils.cc
|
| +++ b/chrome/browser/android/offline_pages/offline_page_utils.cc
|
| @@ -18,6 +18,7 @@
|
| #include "components/offline_pages/offline_page_feature.h"
|
| #include "components/offline_pages/offline_page_item.h"
|
| #include "components/offline_pages/offline_page_model.h"
|
| +#include "components/offline_pages/request_header/offline_page_header.h"
|
| #include "content/public/browser/browser_context.h"
|
| #include "content/public/browser/web_contents.h"
|
| #include "url/gurl.h"
|
| @@ -152,6 +153,7 @@ void OfflinePageUtils::MarkPageAccessed(
|
| offline_page_model->MarkPageAccessed(offline_page->offline_id);
|
| }
|
|
|
| +// static
|
| const OfflinePageItem* OfflinePageUtils::GetOfflinePageFromWebContents(
|
| content::WebContents* web_contents) {
|
| OfflinePageTabHelper* tab_helper =
|
| @@ -160,6 +162,14 @@ const OfflinePageItem* OfflinePageUtils::GetOfflinePageFromWebContents(
|
| }
|
|
|
| // static
|
| +const OfflinePageHeader* OfflinePageUtils::GetOfflineHeaderFromWebContents(
|
| + content::WebContents* web_contents) {
|
| + OfflinePageTabHelper* tab_helper =
|
| + OfflinePageTabHelper::FromWebContents(web_contents);
|
| + return tab_helper ? &(tab_helper->offline_header()) : nullptr;
|
| +}
|
| +
|
| +// static
|
| bool OfflinePageUtils::GetTabId(content::WebContents* web_contents,
|
| int* tab_id) {
|
| TabAndroid* tab_android = TabAndroid::FromWebContents(web_contents);
|
|
|