Chromium Code Reviews| Index: chrome/browser/android/offline_pages/offline_page_mhtml_archiver.cc |
| diff --git a/chrome/browser/android/offline_pages/offline_page_mhtml_archiver.cc b/chrome/browser/android/offline_pages/offline_page_mhtml_archiver.cc |
| index d8560f1e05a4decd9683d68e844ed3399141b3f7..014b04bf839e79673c70f24e27235aa3bfa1e2c3 100644 |
| --- a/chrome/browser/android/offline_pages/offline_page_mhtml_archiver.cc |
| +++ b/chrome/browser/android/offline_pages/offline_page_mhtml_archiver.cc |
| @@ -16,8 +16,10 @@ |
| #include "chrome/browser/ssl/security_state_tab_helper.h" |
| #include "components/security_state/core/security_state.h" |
| #include "content/public/browser/browser_thread.h" |
| +#include "content/public/browser/navigation_entry.h" |
| #include "content/public/browser/web_contents.h" |
| #include "content/public/common/mhtml_generation_params.h" |
| +#include "content/public/common/page_type.h" |
| #include "net/base/filename_util.h" |
| namespace offline_pages { |
| @@ -63,6 +65,12 @@ void OfflinePageMHTMLArchiver::CreateArchive( |
| return; |
| } |
| + if (web_contents_->GetController().GetVisibleEntry()->GetPageType() != |
| + content::PageType::PAGE_TYPE_NORMAL) { |
|
chili
2017/04/10 20:27:18
The error page types are: NORMAL, ERROR, INTERSTIT
romax
2017/04/10 21:19:34
would it be possible that the INTERSTITIAL page is
Pete Williamson
2017/04/11 17:08:50
Good comment, please add it to the code instead of
chili
2017/04/11 20:40:16
As the code is currently implemented, that's not v
|
| + ReportFailure(ArchiverResult::ERROR_PAGE); |
| + return; |
| + } |
| + |
| GenerateMHTML(archives_dir, create_archive_params); |
| } |