OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/session_manager/core/session_manager.h" | 5 #include "components/session_manager/core/session_manager.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 | 8 |
9 #if defined(OS_CHROMEOS) | 9 #if defined(OS_CHROMEOS) |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 SessionManager::instance = session_manager; | 54 SessionManager::instance = session_manager; |
55 } | 55 } |
56 | 56 |
57 void SessionManager::Start() { | 57 void SessionManager::Start() { |
58 delegate_->Start(); | 58 delegate_->Start(); |
59 } | 59 } |
60 | 60 |
61 // static | 61 // static |
62 bool SessionManager::HasBrowserRestarted() { | 62 bool SessionManager::HasBrowserRestarted() { |
63 #if defined(OS_CHROMEOS) | 63 #if defined(OS_CHROMEOS) |
64 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 64 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
65 return base::SysInfo::IsRunningOnChromeOS() && | 65 return base::SysInfo::IsRunningOnChromeOS() && |
66 command_line->HasSwitch(chromeos::switches::kLoginUser); | 66 command_line->HasSwitch(chromeos::switches::kLoginUser); |
67 #else | 67 #else |
68 return false; | 68 return false; |
69 #endif | 69 #endif |
70 } | 70 } |
71 | 71 |
72 SessionManagerDelegate::SessionManagerDelegate() : session_manager_(NULL) { | 72 SessionManagerDelegate::SessionManagerDelegate() : session_manager_(NULL) { |
73 } | 73 } |
74 | 74 |
75 SessionManagerDelegate::~SessionManagerDelegate() { | 75 SessionManagerDelegate::~SessionManagerDelegate() { |
76 } | 76 } |
77 | 77 |
78 void SessionManagerDelegate::SetSessionManager( | 78 void SessionManagerDelegate::SetSessionManager( |
79 session_manager::SessionManager* session_manager) { | 79 session_manager::SessionManager* session_manager) { |
80 session_manager_ = session_manager; | 80 session_manager_ = session_manager; |
81 } | 81 } |
82 | 82 |
83 } // namespace session_manager | 83 } // namespace session_manager |
OLD | NEW |