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

Unified Diff: ios/chrome/browser/crash_report/crash_restore_helper.mm

Issue 1360993002: Moved NavigationManagerImpl serialization out of CRWSessionController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test fix Created 3 years, 11 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
Index: ios/chrome/browser/crash_report/crash_restore_helper.mm
diff --git a/ios/chrome/browser/crash_report/crash_restore_helper.mm b/ios/chrome/browser/crash_report/crash_restore_helper.mm
index ad2b05f963ad6bad12ca8240ae26bedf3f1a5739..38a23ad85ca977c1c5c337a7ce9784890ad49b99 100644
--- a/ios/chrome/browser/crash_report/crash_restore_helper.mm
+++ b/ios/chrome/browser/crash_report/crash_restore_helper.mm
@@ -288,16 +288,18 @@ - (void)infoBarRemoved:(infobars::InfoBar*)infobar {
loadWindowFromPath:[self sessionBackupPath]
forBrowserState:[_tabModel browserState]];
DCHECK(window);
- if (!window.unclaimedSessions)
+ NSArray* sessions = window.sessions;
+ if (!sessions.count)
return;
sessions::TabRestoreService* const tabRestoreService =
IOSChromeTabRestoreServiceFactory::GetForBrowserState(_browserState);
tabRestoreService->LoadTabsFromLastSession();
- while (window.unclaimedSessions) {
+ for (CRWNavigationManagerSerialization* session in sessions) {
+ web::WebState::CreateParams params(_browserState, session);
+ std::unique_ptr<web::WebState> webState = web::WebState::Create(params);
// Add all tabs at the 0 position as the position is relative to an old
// tabModel.
- std::unique_ptr<web::WebStateImpl> webState = [window nextSession];
tabRestoreService->CreateHistoricalTab(
sessions::IOSLiveTab::GetForWebState(webState.get()), 0);
}
« no previous file with comments | « no previous file | ios/chrome/browser/sessions/session_service.mm » ('j') | ios/chrome/browser/sessions/session_window.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698