Chromium Code Reviews| 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/enrollment/auto_enrollment_controller.h" | 5 #include "chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 90 // This method is called at the point in the OOBE/login flow at which the | 90 // This method is called at the point in the OOBE/login flow at which the |
| 91 // auto-enrollment check can start. This happens either after the EULA is | 91 // auto-enrollment check can start. This happens either after the EULA is |
| 92 // accepted, or right after a reboot if the EULA has already been accepted. | 92 // accepted, or right after a reboot if the EULA has already been accepted. |
| 93 | 93 |
| 94 // Do not communicate auto-enrollment data to the server if | 94 // Do not communicate auto-enrollment data to the server if |
| 95 // 1. we are running integration or perf tests with telemetry. | 95 // 1. we are running integration or perf tests with telemetry. |
| 96 // 2. modulus configuration is not present. | 96 // 2. modulus configuration is not present. |
| 97 // 3. Auto-enrollment is disabled via the command line. | 97 // 3. Auto-enrollment is disabled via the command line. |
| 98 | 98 |
| 99 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 99 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 100 if (command_line->HasSwitch(chromeos::switches::kOobeSkipPostLogin) || | 100 if (command_line->HasSwitch(chromeos::switches::kDisableSessionRestore) || |
|
Nikita (slow)
2014/07/14 09:32:59
I seems like you should use a different flag here
achuithb
2014/07/16 20:00:52
Renamed to kDisableGaiaServices.
| |
| 101 (!command_line->HasSwitch( | 101 (!command_line->HasSwitch( |
| 102 chromeos::switches::kEnterpriseEnrollmentInitialModulus) && | 102 chromeos::switches::kEnterpriseEnrollmentInitialModulus) && |
| 103 !command_line->HasSwitch( | 103 !command_line->HasSwitch( |
| 104 chromeos::switches::kEnterpriseEnrollmentModulusLimit)) || | 104 chromeos::switches::kEnterpriseEnrollmentModulusLimit)) || |
| 105 GetMode() == MODE_NONE) { | 105 GetMode() == MODE_NONE) { |
| 106 VLOG(1) << "Auto-enrollment disabled."; | 106 VLOG(1) << "Auto-enrollment disabled."; |
| 107 UpdateState(policy::AUTO_ENROLLMENT_STATE_NO_ENROLLMENT); | 107 UpdateState(policy::AUTO_ENROLLMENT_STATE_NO_ENROLLMENT); |
| 108 return; | 108 return; |
| 109 } | 109 } |
| 110 | 110 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 205 client_->Start(); | 205 client_->Start(); |
| 206 } | 206 } |
| 207 | 207 |
| 208 void AutoEnrollmentController::UpdateState( | 208 void AutoEnrollmentController::UpdateState( |
| 209 policy::AutoEnrollmentState new_state) { | 209 policy::AutoEnrollmentState new_state) { |
| 210 state_ = new_state; | 210 state_ = new_state; |
| 211 progress_callbacks_.Notify(state_); | 211 progress_callbacks_.Notify(state_); |
| 212 } | 212 } |
| 213 | 213 |
| 214 } // namespace chromeos | 214 } // namespace chromeos |
| OLD | NEW |