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

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

Issue 2810743002: [ios] Refactor SessionServiceIOS to remove dependency on BrowserState. (Closed)
Patch Set: Rebase. 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
Index: ios/chrome/browser/tabs/tab_model.mm
diff --git a/ios/chrome/browser/tabs/tab_model.mm b/ios/chrome/browser/tabs/tab_model.mm
index 66fec7ea6832d49bb8fe5f8a0de13307752c4c0e..81deba47f2d74a3f9b3d2af9b94bc4b27ada96ba 100644
--- a/ios/chrome/browser/tabs/tab_model.mm
+++ b/ios/chrome/browser/tabs/tab_model.mm
@@ -362,9 +362,12 @@ void CleanCertificatePolicyCache(
// a transitional state.
if ((!self.currentTab && _webStateList->count()) || !_browserState)
return;
- [_sessionService saveWindow:self.windowForSavingSession
- forBrowserState:_browserState
- immediately:immediately];
+ NSString* statePath =
+ base::SysUTF8ToNSString(_browserState->GetStatePath().AsUTF8Unsafe());
+ NSString* sessionPath = [_sessionService sessionPathForDirectory:statePath];
+ [_sessionService saveSessionWindow:self.windowForSavingSession
+ sessionPath:sessionPath
+ immediately:immediately];
}
- (Tab*)tabAtIndex:(NSUInteger)index {

Powered by Google App Engine
This is Rietveld 408576698