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

Unified Diff: ios/chrome/browser/tabs/tab.mm

Issue 2606873002: Move the offline URL trimming to GetFormattedURL. (Closed)
Patch Set: clean Created 4 years 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
Index: ios/chrome/browser/tabs/tab.mm
diff --git a/ios/chrome/browser/tabs/tab.mm b/ios/chrome/browser/tabs/tab.mm
index a0a17d92dd9d19fadf2b3c799dcad2ff89442d64..9e99b4771706979cc423ffcdeaf6d27f6bd91e43 100644
--- a/ios/chrome/browser/tabs/tab.mm
+++ b/ios/chrome/browser/tabs/tab.mm
@@ -76,6 +76,7 @@
#import "ios/chrome/browser/passwords/password_controller.h"
#import "ios/chrome/browser/passwords/passwords_ui_delegate_impl.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/reading_list/reading_list_web_state_observer.h"
#include "ios/chrome/browser/search_engines/template_url_service_factory.h"
@@ -2421,6 +2422,11 @@ void AddNetworkClientFactoryOnIOThread(
fromIndex > toIndex);
}
+- (BOOL)isOffline {
+ return reading_list::IsOfflineURL(
+ [self navigationManager]->GetVisibleItem()->GetURL());
+}
+
@end
#pragma mark - TestingSupport

Powered by Google App Engine
This is Rietveld 408576698