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

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

Issue 2655253002: Revert of Moved NavigationManagerImpl serialization out of CRWSessionController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | ios/chrome/browser/sessions/session_service.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6a66ab781b8249714659792f9c02f3b4311bfa65..ad2b05f963ad6bad12ca8240ae26bedf3f1a5739 100644
--- a/ios/chrome/browser/crash_report/crash_restore_helper.mm
+++ b/ios/chrome/browser/crash_report/crash_restore_helper.mm
@@ -288,19 +288,16 @@
loadWindowFromPath:[self sessionBackupPath]
forBrowserState:[_tabModel browserState]];
DCHECK(window);
- NSArray* sessions = window.sessions;
- if (!sessions.count)
+ if (!window.unclaimedSessions)
return;
sessions::TabRestoreService* const tabRestoreService =
IOSChromeTabRestoreServiceFactory::GetForBrowserState(_browserState);
tabRestoreService->LoadTabsFromLastSession();
- web::WebState::CreateParams params(_browserState);
- for (CRWNavigationManagerStorage* session in sessions) {
- std::unique_ptr<web::WebState> webState =
- web::WebState::Create(params, session);
+ while (window.unclaimedSessions) {
// 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698