[Reading List] Show page info for offline pages
Offline pages pages show informations about offline state in the page
info model.
Clean-up after https://codereview.chromium.org/2723683002
BUG=696628
Review-Url: https://codereview.chromium.org/2721403002
Cr-Commit-Position: refs/heads/master@{#454030}
diff --git a/ios/chrome/browser/ui/browser_view_controller.mm b/ios/chrome/browser/ui/browser_view_controller.mm
index 9e9b20a..767fdea 100644
--- a/ios/chrome/browser/ui/browser_view_controller.mm
+++ b/ios/chrome/browser/ui/browser_view_controller.mm
@@ -71,6 +71,7 @@
#import "ios/chrome/browser/passwords/password_controller.h"
#import "ios/chrome/browser/payments/payment_request_manager.h"
#include "ios/chrome/browser/pref_names.h"
+#include "ios/chrome/browser/reading_list/offline_url_utils.h"
#include "ios/chrome/browser/reading_list/reading_list_model_factory.h"
#include "ios/chrome/browser/search_engines/template_url_service_factory.h"
#include "ios/chrome/browser/sessions/ios_chrome_tab_restore_service_factory.h"
@@ -3318,9 +3319,12 @@
if (!navItem)
return;
- // Don't show if the page is native.
- if ([self isTabNativePage:tab])
+ // Don't show if the page is native except for offline pages (to show the
+ // offline page info).
+ if ([self isTabNativePage:tab] &&
+ !reading_list::IsOfflineURL(navItem->GetURL())) {
return;
+ }
// Don't show the bubble twice (this can happen when tapping very quickly in
// accessibility mode).