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

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

Issue 23904025: Move IsRunningOnChromeOS to SysInfo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge fix Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « chromeos/ime/xkeyboard.cc ('k') | chromeos/memory/low_memory_listener.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/chromeos/chromeos_version.h"
8 #include "base/command_line.h" 7 #include "base/command_line.h"
9 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/sys_info.h"
10 #include "chromeos/chromeos_switches.h" 10 #include "chromeos/chromeos_switches.h"
11 11
12 namespace chromeos { 12 namespace chromeos {
13 13
14 namespace { 14 namespace {
15 15
16 // When running a Chrome OS build outside of a device (i.e. on a developer's 16 // When running a Chrome OS build outside of a device (i.e. on a developer's
17 // workstation) and not running as login-manager, pretend like we're always 17 // workstation) and not running as login-manager, pretend like we're always
18 // logged in. 18 // logged in.
19 bool AlwaysLoggedIn() { 19 bool AlwaysLoggedIn() {
20 return !base::chromeos::IsRunningOnChromeOS() && 20 return !base::SysInfo::IsRunningOnChromeOS() &&
21 !CommandLine::ForCurrentProcess()->HasSwitch(switches::kLoginManager); 21 !CommandLine::ForCurrentProcess()->HasSwitch(switches::kLoginManager);
22 } 22 }
23 23
24 } // namespace 24 } // namespace
25 25
26 static LoginState* g_login_state = NULL; 26 static LoginState* g_login_state = NULL;
27 27
28 // static 28 // static
29 void LoginState::Initialize() { 29 void LoginState::Initialize() {
30 CHECK(!g_login_state); 30 CHECK(!g_login_state);
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 LoginState::~LoginState() { 123 LoginState::~LoginState() {
124 } 124 }
125 125
126 void LoginState::NotifyObservers() { 126 void LoginState::NotifyObservers() {
127 FOR_EACH_OBSERVER(LoginState::Observer, observer_list_, 127 FOR_EACH_OBSERVER(LoginState::Observer, observer_list_,
128 LoggedInStateChanged()); 128 LoggedInStateChanged());
129 } 129 }
130 130
131 } // namespace chromeos 131 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/ime/xkeyboard.cc ('k') | chromeos/memory/low_memory_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698