Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/wizard_controller.h" | 5 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 6 | 6 |
| 7 #include <signal.h> | 7 #include <signal.h> |
| 8 #include <stdlib.h> | 8 #include <stdlib.h> |
| 9 #include <sys/types.h> | 9 #include <sys/types.h> |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 45 #include "chrome/browser/chromeos/login/screens/update_screen.h" | 45 #include "chrome/browser/chromeos/login/screens/update_screen.h" |
| 46 #include "chrome/browser/chromeos/login/screens/user_image_screen.h" | 46 #include "chrome/browser/chromeos/login/screens/user_image_screen.h" |
| 47 #include "chrome/browser/chromeos/login/screens/wrong_hwid_screen.h" | 47 #include "chrome/browser/chromeos/login/screens/wrong_hwid_screen.h" |
| 48 #include "chrome/browser/chromeos/login/startup_utils.h" | 48 #include "chrome/browser/chromeos/login/startup_utils.h" |
| 49 #include "chrome/browser/chromeos/login/supervised/supervised_user_creation_scre en.h" | 49 #include "chrome/browser/chromeos/login/supervised/supervised_user_creation_scre en.h" |
| 50 #include "chrome/browser/chromeos/login/ui/login_display_host.h" | 50 #include "chrome/browser/chromeos/login/ui/login_display_host.h" |
| 51 #include "chrome/browser/chromeos/login/ui/oobe_display.h" | 51 #include "chrome/browser/chromeos/login/ui/oobe_display.h" |
| 52 #include "chrome/browser/chromeos/net/delay_network_call.h" | 52 #include "chrome/browser/chromeos/net/delay_network_call.h" |
| 53 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 53 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 54 #include "chrome/browser/chromeos/policy/device_cloud_policy_initializer.h" | 54 #include "chrome/browser/chromeos/policy/device_cloud_policy_initializer.h" |
| 55 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" | |
| 55 #include "chrome/browser/chromeos/settings/cros_settings.h" | 56 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 56 #include "chrome/browser/chromeos/timezone/timezone_provider.h" | 57 #include "chrome/browser/chromeos/timezone/timezone_provider.h" |
| 57 #include "chrome/browser/lifetime/application_lifetime.h" | 58 #include "chrome/browser/lifetime/application_lifetime.h" |
| 58 #include "chrome/browser/metrics/metrics_reporting_state.h" | 59 #include "chrome/browser/metrics/metrics_reporting_state.h" |
| 59 #include "chrome/browser/profiles/profile.h" | 60 #include "chrome/browser/profiles/profile.h" |
| 60 #include "chrome/browser/profiles/profile_manager.h" | 61 #include "chrome/browser/profiles/profile_manager.h" |
| 61 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" | 62 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
| 62 #include "chrome/common/chrome_constants.h" | 63 #include "chrome/common/chrome_constants.h" |
| 63 #include "chrome/common/pref_names.h" | 64 #include "chrome/common/pref_names.h" |
| 64 #include "chromeos/audio/cras_audio_handler.h" | 65 #include "chromeos/audio/cras_audio_handler.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 98 chromeos::WizardController::kTermsOfServiceScreenName, | 99 chromeos::WizardController::kTermsOfServiceScreenName, |
| 99 chromeos::WizardController::kAutoEnrollmentCheckScreenName | 100 chromeos::WizardController::kAutoEnrollmentCheckScreenName |
| 100 }; | 101 }; |
| 101 | 102 |
| 102 // Checks flag for HID-detection screen show. | 103 // Checks flag for HID-detection screen show. |
| 103 bool CanShowHIDDetectionScreen() { | 104 bool CanShowHIDDetectionScreen() { |
| 104 return !CommandLine::ForCurrentProcess()->HasSwitch( | 105 return !CommandLine::ForCurrentProcess()->HasSwitch( |
| 105 chromeos::switches::kDisableHIDDetectionOnOOBE); | 106 chromeos::switches::kDisableHIDDetectionOnOOBE); |
| 106 } | 107 } |
| 107 | 108 |
| 108 bool ShouldShowControllerPairingScreen() { | 109 bool ShouldShowControllerPairingScreen() { |
|
achuithb
2014/08/29 23:03:34
Why not get rid of this altogether?
Zachary Kuznia
2014/08/29 23:27:10
Done.
| |
| 109 return CommandLine::ForCurrentProcess()->HasSwitch( | 110 const bool is_shark = |
| 110 chromeos::switches::kShowControllerPairingDemo); | 111 g_browser_process->platform_part()->browser_policy_connector_chromeos()-> |
|
achuithb
2014/08/29 23:03:34
Might as well just return this instead of creating
Zachary Kuznia
2014/08/29 23:27:10
Function removed.
| |
| 112 GetDeviceCloudPolicyManager()->IsSharkRequisition(); | |
| 113 | |
| 114 return is_shark; | |
| 111 } | 115 } |
| 112 | 116 |
| 113 bool ShouldShowHostPairingScreen() { | 117 bool ShouldShowHostPairingScreen() { |
| 114 return CommandLine::ForCurrentProcess()->HasSwitch( | 118 return CommandLine::ForCurrentProcess()->HasSwitch( |
| 115 chromeos::switches::kShowHostPairingDemo); | 119 chromeos::switches::kShowHostPairingDemo); |
| 116 } | 120 } |
| 117 | 121 |
| 118 bool IsResumableScreen(const std::string& screen) { | 122 bool IsResumableScreen(const std::string& screen) { |
| 119 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kResumableScreens); ++i) { | 123 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kResumableScreens); ++i) { |
| 120 if (screen == kResumableScreens[i]) | 124 if (screen == kResumableScreens[i]) |
| (...skipping 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1294 if (ShouldAutoStartEnrollment() || ShouldRecoverEnrollment()) { | 1298 if (ShouldAutoStartEnrollment() || ShouldRecoverEnrollment()) { |
| 1295 StartupUtils::MarkEulaAccepted(); | 1299 StartupUtils::MarkEulaAccepted(); |
| 1296 auth_token_ = token; | 1300 auth_token_ = token; |
| 1297 InitiateOOBEUpdate(); | 1301 InitiateOOBEUpdate(); |
| 1298 } else { | 1302 } else { |
| 1299 LOG(WARNING) << "Not in device enrollment."; | 1303 LOG(WARNING) << "Not in device enrollment."; |
| 1300 } | 1304 } |
| 1301 } | 1305 } |
| 1302 | 1306 |
| 1303 } // namespace chromeos | 1307 } // namespace chromeos |
| OLD | NEW |