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

Side by Side Diff: ios/chrome/browser/sessions/session_util.mm

Issue 2808773004: [ios] Change WebStateList serialization method to use SessionWindowIOS. (Closed)
Patch Set: Rename //ios/chrome/browser/sessions:session_window_ios target. 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 unified diff | Download patch
« no previous file with comments | « ios/chrome/browser/sessions/NSCoder+Compatibility.mm ('k') | ios/chrome/browser/tabs/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ios/chrome/browser/sessions/session_util.h" 5 #include "ios/chrome/browser/sessions/session_util.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/strings/sys_string_conversions.h" 8 #include "base/strings/sys_string_conversions.h"
9 #import "ios/chrome/browser/sessions/session_service_ios.h" 9 #import "ios/chrome/browser/sessions/session_service_ios.h"
10 #include "ios/web/public/browser_state.h" 10 #include "ios/web/public/browser_state.h"
11 11
12 #if !defined(__has_feature) || !__has_feature(objc_arc)
13 #error "This file requires ARC support."
14 #endif
15
12 namespace session_util { 16 namespace session_util {
13 17
14 // Deletes the file containing the commands for the last session. 18 // Deletes the file containing the commands for the last session.
15 void DeleteLastSession(web::BrowserState* browser_state) { 19 void DeleteLastSession(web::BrowserState* browser_state) {
16 NSString* state_path = 20 NSString* state_path =
17 base::SysUTF8ToNSString(browser_state->GetStatePath().AsUTF8Unsafe()); 21 base::SysUTF8ToNSString(browser_state->GetStatePath().AsUTF8Unsafe());
18 [[SessionServiceIOS sharedService] 22 [[SessionServiceIOS sharedService]
19 deleteLastSessionFileInDirectory:state_path]; 23 deleteLastSessionFileInDirectory:state_path];
20 } 24 }
21 25
22 } // namespace session_util 26 } // namespace session_util
OLDNEW
« no previous file with comments | « ios/chrome/browser/sessions/NSCoder+Compatibility.mm ('k') | ios/chrome/browser/tabs/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698