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

Unified Diff: chrome/browser/chromeos/login/session/chrome_session_manager.cc

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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: chrome/browser/chromeos/login/session/chrome_session_manager.cc
diff --git a/chrome/browser/chromeos/login/session/chrome_session_manager.cc b/chrome/browser/chromeos/login/session/chrome_session_manager.cc
index 1039a403af9bb7dedd1ab64a61dcd1abbc813d2c..2225291666385dcfb6ccba2a78e3e31ca4fd9440 100644
--- a/chrome/browser/chromeos/login/session/chrome_session_manager.cc
+++ b/chrome/browser/chromeos/login/session/chrome_session_manager.cc
@@ -4,9 +4,10 @@
#include "chrome/browser/chromeos/login/session/chrome_session_manager.h"
+#include <memory>
+
#include "base/command_line.h"
#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
#include "base/sys_info.h"
#include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h"
#include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
@@ -35,7 +36,7 @@ bool ShouldAutoLaunchKioskApp(const base::CommandLine& command_line) {
} // namespace
// static
-scoped_ptr<session_manager::SessionManager>
+std::unique_ptr<session_manager::SessionManager>
ChromeSessionManager::CreateSessionManager(
const base::CommandLine& parsed_command_line,
Profile* profile,
@@ -55,17 +56,18 @@ ChromeSessionManager::CreateSessionManager(
if (ShouldAutoLaunchKioskApp(parsed_command_line)) {
VLOG(1) << "Starting Chrome with KioskAutoLauncherSessionManagerDelegate";
- return scoped_ptr<session_manager::SessionManager>(new ChromeSessionManager(
- new KioskAutoLauncherSessionManagerDelegate()));
+ return std::unique_ptr<session_manager::SessionManager>(
+ new ChromeSessionManager(
+ new KioskAutoLauncherSessionManagerDelegate()));
} else if (parsed_command_line.HasSwitch(switches::kLoginManager) &&
(!is_running_test || force_login_screen_in_test)) {
VLOG(1) << "Starting Chrome with LoginOobeSessionManagerDelegate";
- return scoped_ptr<session_manager::SessionManager>(
+ return std::unique_ptr<session_manager::SessionManager>(
new ChromeSessionManager(new LoginOobeSessionManagerDelegate()));
} else if (!base::SysInfo::IsRunningOnChromeOS() &&
login_account_id == login::StubAccountId()) {
VLOG(1) << "Starting Chrome with StubLoginSessionManagerDelegate";
- return scoped_ptr<session_manager::SessionManager>(
+ return std::unique_ptr<session_manager::SessionManager>(
new ChromeSessionManager(new StubLoginSessionManagerDelegate(
profile, login_account_id.GetUserEmail())));
} else {
@@ -77,7 +79,7 @@ ChromeSessionManager::CreateSessionManager(
// 4. Chrome is started on dev machine i.e. not on Chrome OS device w/o
// login flow. In that case --login-user=[chromeos::login::kStubUser] is
// added. See PreEarlyInitialization().
- return scoped_ptr<session_manager::SessionManager>(
+ return std::unique_ptr<session_manager::SessionManager>(
new ChromeSessionManager(new RestoreAfterCrashSessionManagerDelegate(
profile, login_account_id.GetUserEmail())));
}

Powered by Google App Engine
This is Rietveld 408576698