Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Unified Diff: ios/chrome/browser/ui/browser_view_controller.mm

Issue 2721403002: [Reading List] Show page info for offline pages (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/browser_view_controller.mm
diff --git a/ios/chrome/browser/ui/browser_view_controller.mm b/ios/chrome/browser/ui/browser_view_controller.mm
index 435b2c7241ce7ab76f320dea08fcd3b2e6025fa2..9d87e8a52851d2bca7c66075b43f8d8e0574c6b4 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 @@ class BrowserBookmarkModelBridge : public bookmarks::BookmarkModelObserver {
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).
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698