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

Unified Diff: ios/chrome/browser/sessions/session_util.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
Index: ios/chrome/browser/sessions/session_util.mm
diff --git a/ios/chrome/browser/sessions/session_util.mm b/ios/chrome/browser/sessions/session_util.mm
index e7d5f2642395c6a6b2d61bd73c7efc271d704dc7..a332c953adddcdf8ee30e3778ce6eeb1f574f8d7 100644
--- a/ios/chrome/browser/sessions/session_util.mm
+++ b/ios/chrome/browser/sessions/session_util.mm
@@ -13,10 +13,10 @@ namespace session_util {
// Deletes the file containing the commands for the last session.
void DeleteLastSession(web::BrowserState* browser_state) {
- SessionServiceIOS* session_service = [SessionServiceIOS sharedService];
- NSString* path =
- base::SysUTF8ToNSString(browser_state->GetStatePath().value());
- [session_service deleteLastSession:path];
+ NSString* state_path =
+ base::SysUTF8ToNSString(browser_state->GetStatePath().AsUTF8Unsafe());
+ [[SessionServiceIOS sharedService]
+ deleteLastSessionFileInDirectory:state_path];
}
} // namespace session_util
« no previous file with comments | « ios/chrome/browser/sessions/session_service_ios_unittest.mm ('k') | ios/chrome/browser/sessions/test_session_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698