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 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 | 9 |
10 namespace session_manager { | 10 namespace session_manager { |
(...skipping 28 matching lines...) Expand all Loading... |
39 } | 39 } |
40 | 40 |
41 bool SessionManager::IsSessionStarted() const { | 41 bool SessionManager::IsSessionStarted() const { |
42 return session_started_; | 42 return session_started_; |
43 } | 43 } |
44 | 44 |
45 void SessionManager::SessionStarted() { | 45 void SessionManager::SessionStarted() { |
46 session_started_ = true; | 46 session_started_ = true; |
47 } | 47 } |
48 | 48 |
49 void SessionManager::Initialize(SessionManagerDelegate* delegate) { | |
50 DCHECK(delegate); | |
51 delegate_.reset(delegate); | |
52 delegate_->SetSessionManager(this); | |
53 } | |
54 | |
55 // static | 49 // static |
56 void SessionManager::SetInstance(SessionManager* session_manager) { | 50 void SessionManager::SetInstance(SessionManager* session_manager) { |
57 SessionManager::instance = session_manager; | 51 SessionManager::instance = session_manager; |
58 } | 52 } |
59 | 53 |
60 void SessionManager::Start() { | |
61 delegate_->Start(); | |
62 } | |
63 | |
64 SessionManagerDelegate::SessionManagerDelegate() { | |
65 } | |
66 | |
67 SessionManagerDelegate::~SessionManagerDelegate() { | |
68 } | |
69 | |
70 void SessionManagerDelegate::SetSessionManager( | |
71 session_manager::SessionManager* session_manager) { | |
72 session_manager_ = session_manager; | |
73 } | |
74 | |
75 } // namespace session_manager | 54 } // namespace session_manager |
OLD | NEW |