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

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

Issue 2578973002: Reload offline version on load failure (Closed)
Patch Set: rebase + const 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
« no previous file with comments | « ios/chrome/browser/tabs/BUILD.gn ('k') | ios/chrome/browser/ui/reading_list/offline_page_native_content.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/tabs/tab.mm
diff --git a/ios/chrome/browser/tabs/tab.mm b/ios/chrome/browser/tabs/tab.mm
index 6c7d0c2b988b7ccc4dff1a19bd58dc0d69fa091d..a0a17d92dd9d19fadf2b3c799dcad2ff89442d64 100644
--- a/ios/chrome/browser/tabs/tab.mm
+++ b/ios/chrome/browser/tabs/tab.mm
@@ -41,6 +41,8 @@
#include "components/navigation_metrics/navigation_metrics.h"
#include "components/navigation_metrics/origins_seen_service.h"
#include "components/prefs/pref_service.h"
+#include "components/reading_list/core/reading_list_switches.h"
+#include "components/reading_list/ios/reading_list_model.h"
#include "components/search_engines/template_url_service.h"
#include "components/sessions/core/session_types.h"
#include "components/sessions/ios/ios_serialized_navigation_builder.h"
@@ -74,6 +76,8 @@
#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/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"
#include "ios/chrome/browser/sessions/ios_chrome_session_tab_helper.h"
#include "ios/chrome/browser/signin/account_consistency_service_factory.h"
@@ -579,6 +583,12 @@ void AddNetworkClientFactoryOnIOThread(
InfoBarManagerImpl::CreateForWebState(self.webState);
IOSSecurityStateTabHelper::CreateForWebState(self.webState);
+ if (reading_list::switches::IsReadingListEnabled()) {
+ ReadingListModel* model =
+ ReadingListModelFactory::GetForBrowserState(browserState_);
+ ReadingListWebStateObserver::FromWebState(self.webState, model);
+ }
+
tabInfoBarObserver_.reset(new TabInfoBarObserver(self));
tabInfoBarObserver_->SetShouldObserveInfoBarManager(true);
« no previous file with comments | « ios/chrome/browser/tabs/BUILD.gn ('k') | ios/chrome/browser/ui/reading_list/offline_page_native_content.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698