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

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

Issue 2810743002: [ios] Refactor SessionServiceIOS to remove dependency on BrowserState. (Closed)
Patch Set: Fix a typo in SessionServiceIOS initializer's comment. Created 3 years, 8 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/crash_report/crash_restore_helper_unittest.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 98d8754a104e50e1a91648e4183bbf704c69a776..a2e23b5fbf35f08926f5ced343398cc95400aca1 100644
--- a/ios/chrome/browser/crash_report/crash_restore_helper.mm
+++ b/ios/chrome/browser/crash_report/crash_restore_helper.mm
@@ -201,11 +201,9 @@ int SessionCrashedInfoBarDelegate::GetIconId() const {
- (BOOL)deleteSessionForBrowserState:(ios::ChromeBrowserState*)browserState
backupFile:(NSString*)file {
- SessionServiceIOS* sessionService = [SessionServiceIOS sharedService];
NSString* stashPath =
base::SysUTF8ToNSString(browserState->GetStatePath().value());
- NSString* sessionPath =
- [sessionService sessionFilePathForDirectory:stashPath];
+ NSString* sessionPath = [SessionServiceIOS sessionPathForDirectory:stashPath];
NSFileManager* fileManager = [NSFileManager defaultManager];
if (![fileManager fileExistsAtPath:sessionPath])
return NO;
@@ -262,7 +260,7 @@ int SessionCrashedInfoBarDelegate::GetIconId() const {
_sessionRestored = YES;
_infoBarBridge.reset();
SessionWindowIOS* sessionWindow = [[SessionServiceIOS sharedService]
- loadWindowFromPath:[self sessionBackupPath]];
+ loadSessionWindowFromPath:[self sessionBackupPath]];
if (sessionWindow) {
breakpad_helper::WillStartCrashRestoration();
return [_tabModel restoreSessionWindow:sessionWindow];
@@ -284,7 +282,7 @@ int SessionCrashedInfoBarDelegate::GetIconId() const {
_sessionRestored = YES;
SessionWindowIOS* window = [[SessionServiceIOS sharedService]
- loadWindowFromPath:[self sessionBackupPath]];
+ loadSessionWindowFromPath:[self sessionBackupPath]];
DCHECK(window);
NSArray* sessions = window.sessions;
if (!sessions.count)
« no previous file with comments | « no previous file | ios/chrome/browser/crash_report/crash_restore_helper_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698