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

Side by Side Diff: components/session_manager/core/session_manager.cc

Issue 2444383008: session_manager: Create ChromeSessionManager early (Closed)
Patch Set: for #4 Created 4 years, 1 month 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 | « components/session_manager/core/session_manager.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « components/session_manager/core/session_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698