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

Side by Side Diff: chrome/browser/ui/ash/session_state_delegate_chromeos.cc

Issue 816403003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 12 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "chrome/browser/ui/ash/session_state_delegate_chromeos.h" 5 #include "chrome/browser/ui/ash/session_state_delegate_chromeos.h"
6 6
7 #include "ash/multi_profile_uma.h" 7 #include "ash/multi_profile_uma.h"
8 #include "ash/session/session_state_observer.h" 8 #include "ash/session/session_state_observer.h"
9 #include "ash/system/chromeos/multi_user/user_switch_util.h" 9 #include "ash/system/chromeos/multi_user/user_switch_util.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> 133 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()->
134 RequestLockScreen(); 134 RequestLockScreen();
135 } 135 }
136 136
137 void SessionStateDelegateChromeos::UnlockScreen() { 137 void SessionStateDelegateChromeos::UnlockScreen() {
138 // This is used only for testing thus far. 138 // This is used only for testing thus far.
139 NOTIMPLEMENTED(); 139 NOTIMPLEMENTED();
140 } 140 }
141 141
142 bool SessionStateDelegateChromeos::IsUserSessionBlocked() const { 142 bool SessionStateDelegateChromeos::IsUserSessionBlocked() const {
143 bool has_login_manager = CommandLine::ForCurrentProcess()->HasSwitch( 143 bool has_login_manager = base::CommandLine::ForCurrentProcess()->HasSwitch(
144 chromeos::switches::kLoginManager); 144 chromeos::switches::kLoginManager);
145 return (has_login_manager && !IsActiveUserSessionStarted()) || 145 return (has_login_manager && !IsActiveUserSessionStarted()) ||
146 IsScreenLocked() || 146 IsScreenLocked() ||
147 chromeos::UserAddingScreen::Get()->IsRunning(); 147 chromeos::UserAddingScreen::Get()->IsRunning();
148 } 148 }
149 149
150 ash::SessionStateDelegate::SessionState 150 ash::SessionStateDelegate::SessionState
151 SessionStateDelegateChromeos::GetSessionState() const { 151 SessionStateDelegateChromeos::GetSessionState() const {
152 return session_state_; 152 return session_state_;
153 } 153 }
154 154
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 } 284 }
285 285
286 void DoSwitchUser(const std::string& user_id) { 286 void DoSwitchUser(const std::string& user_id) {
287 user_manager::UserManager::Get()->SwitchActiveUser(user_id); 287 user_manager::UserManager::Get()->SwitchActiveUser(user_id);
288 } 288 }
289 289
290 void SessionStateDelegateChromeos::TryToSwitchUser( 290 void SessionStateDelegateChromeos::TryToSwitchUser(
291 const std::string& user_id) { 291 const std::string& user_id) {
292 ash::TrySwitchingActiveUser(base::Bind(&DoSwitchUser, user_id)); 292 ash::TrySwitchingActiveUser(base::Bind(&DoSwitchUser, user_id));
293 } 293 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698