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 "chrome/browser/chromeos/login/supervised/supervised_user_login_flow.h" | 5 #include "chrome/browser/chromeos/login/supervised/supervised_user_login_flow.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 data_loaded_(false), | 34 data_loaded_(false), |
35 weak_factory_(this) { | 35 weak_factory_(this) { |
36 } | 36 } |
37 | 37 |
38 SupervisedUserLoginFlow::~SupervisedUserLoginFlow() {} | 38 SupervisedUserLoginFlow::~SupervisedUserLoginFlow() {} |
39 | 39 |
40 void SupervisedUserLoginFlow::AppendAdditionalCommandLineSwitches() { | 40 void SupervisedUserLoginFlow::AppendAdditionalCommandLineSwitches() { |
41 user_manager::UserManager* user_manager = user_manager::UserManager::Get(); | 41 user_manager::UserManager* user_manager = user_manager::UserManager::Get(); |
42 if (user_manager->IsCurrentUserNew()) { | 42 if (user_manager->IsCurrentUserNew()) { |
43 // Supervised users should launch into empty desktop on first run. | 43 // Supervised users should launch into empty desktop on first run. |
44 CommandLine::ForCurrentProcess()->AppendSwitch(::switches::kSilentLaunch); | 44 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
| 45 ::switches::kSilentLaunch); |
45 } | 46 } |
46 } | 47 } |
47 | 48 |
48 bool SupervisedUserLoginFlow::CanLockScreen() { | 49 bool SupervisedUserLoginFlow::CanLockScreen() { |
49 return true; | 50 return true; |
50 } | 51 } |
51 | 52 |
52 bool SupervisedUserLoginFlow::ShouldLaunchBrowser() { | 53 bool SupervisedUserLoginFlow::ShouldLaunchBrowser() { |
53 return data_loaded_; | 54 return data_loaded_; |
54 } | 55 } |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 void SupervisedUserLoginFlow::LaunchExtraSteps( | 260 void SupervisedUserLoginFlow::LaunchExtraSteps( |
260 Profile* profile) { | 261 Profile* profile) { |
261 profile_ = profile; | 262 profile_ = profile; |
262 ChromeUserManager::Get()->GetSupervisedUserManager()->LoadSupervisedUserToken( | 263 ChromeUserManager::Get()->GetSupervisedUserManager()->LoadSupervisedUserToken( |
263 profile, | 264 profile, |
264 base::Bind(&SupervisedUserLoginFlow::OnSyncSetupDataLoaded, | 265 base::Bind(&SupervisedUserLoginFlow::OnSyncSetupDataLoaded, |
265 weak_factory_.GetWeakPtr())); | 266 weak_factory_.GetWeakPtr())); |
266 } | 267 } |
267 | 268 |
268 } // namespace chromeos | 269 } // namespace chromeos |
OLD | NEW |