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

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: compilation fix after rebase 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 ad2b05f963ad6bad12ca8240ae26bedf3f1a5739..6a66ab781b8249714659792f9c02f3b4311bfa65 100644
--- a/ios/chrome/browser/crash_report/crash_restore_helper.mm
+++ b/ios/chrome/browser/crash_report/crash_restore_helper.mm
@@ -288,16 +288,19 @@ - (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) {
+ web::WebState::CreateParams params(_browserState);
+ for (CRWNavigationManagerStorage* session in sessions) {
+ std::unique_ptr<web::WebState> webState =
+ web::WebState::Create(params, session);
// 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