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

Unified Diff: ios/chrome/browser/sessions/session_util.mm

Issue 2585233003: Upstream Chrome on iOS source code [2/11]. (Closed)
Patch Set: Created 4 years 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 | « ios/chrome/browser/sessions/session_util.h ('k') | ios/chrome/browser/sessions/session_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
new file mode 100644
index 0000000000000000000000000000000000000000..18a3f5cf95fcb38aaa7f49880c092f40ea5e8ac5
--- /dev/null
+++ b/ios/chrome/browser/sessions/session_util.mm
@@ -0,0 +1,22 @@
+// Copyright 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ios/chrome/browser/sessions/session_util.h"
+
+#include "base/files/file_path.h"
+#include "base/strings/sys_string_conversions.h"
+#import "ios/chrome/browser/sessions/session_service.h"
+#include "ios/web/public/browser_state.h"
+
+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];
+}
+
+} // namespace session_util
« no previous file with comments | « ios/chrome/browser/sessions/session_util.h ('k') | ios/chrome/browser/sessions/session_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698