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

Side by Side Diff: chromeos/login/login_state.cc

Issue 825473002: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « chromeos/dbus/update_engine_client.cc ('k') | chromeos/network/network_sms_handler_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chromeos/login/login_state.h" 5 #include "chromeos/login/login_state.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/sys_info.h" 9 #include "base/sys_info.h"
10 #include "chromeos/chromeos_switches.h" 10 #include "chromeos/chromeos_switches.h"
11 #include "chromeos/device_event_log.h" 11 #include "chromeos/device_event_log.h"
12 12
13 namespace chromeos { 13 namespace chromeos {
14 14
15 namespace { 15 namespace {
16 16
17 // When running a Chrome OS build outside of a device (i.e. on a developer's 17 // When running a Chrome OS build outside of a device (i.e. on a developer's
18 // workstation) and not running as login-manager, pretend like we're always 18 // workstation) and not running as login-manager, pretend like we're always
19 // logged in. 19 // logged in.
20 bool AlwaysLoggedInByDefault() { 20 bool AlwaysLoggedInByDefault() {
21 return !base::SysInfo::IsRunningOnChromeOS() && 21 return !base::SysInfo::IsRunningOnChromeOS() &&
22 !CommandLine::ForCurrentProcess()->HasSwitch(switches::kLoginManager); 22 !base::CommandLine::ForCurrentProcess()->HasSwitch(
23 switches::kLoginManager);
23 } 24 }
24 25
25 } // namespace 26 } // namespace
26 27
27 static LoginState* g_login_state = NULL; 28 static LoginState* g_login_state = NULL;
28 29
29 // static 30 // static
30 void LoginState::Initialize() { 31 void LoginState::Initialize() {
31 CHECK(!g_login_state); 32 CHECK(!g_login_state);
32 g_login_state = new LoginState(); 33 g_login_state = new LoginState();
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 131
131 LoginState::~LoginState() { 132 LoginState::~LoginState() {
132 } 133 }
133 134
134 void LoginState::NotifyObservers() { 135 void LoginState::NotifyObservers() {
135 FOR_EACH_OBSERVER(LoginState::Observer, observer_list_, 136 FOR_EACH_OBSERVER(LoginState::Observer, observer_list_,
136 LoggedInStateChanged()); 137 LoggedInStateChanged());
137 } 138 }
138 139
139 } // namespace chromeos 140 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/update_engine_client.cc ('k') | chromeos/network/network_sms_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698