| 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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 | 378 |
| 379 void WizardController::OnSessionStart() { | 379 void WizardController::OnSessionStart() { |
| 380 FOR_EACH_OBSERVER(Observer, observer_list_, OnSessionStart()); | 380 FOR_EACH_OBSERVER(Observer, observer_list_, OnSessionStart()); |
| 381 } | 381 } |
| 382 | 382 |
| 383 void WizardController::SkipUpdateEnrollAfterEula() { | 383 void WizardController::SkipUpdateEnrollAfterEula() { |
| 384 skip_update_enroll_after_eula_ = true; | 384 skip_update_enroll_after_eula_ = true; |
| 385 } | 385 } |
| 386 | 386 |
| 387 // static | 387 // static |
| 388 void WizardController::RegisterPrefs(PrefService* local_state) { | 388 void WizardController::RegisterPrefs(PrefServiceSimple* local_state) { |
| 389 local_state->RegisterBooleanPref(kOobeComplete, | 389 local_state->RegisterBooleanPref(kOobeComplete, false); |
| 390 false, | 390 local_state->RegisterIntegerPref(kDeviceRegistered, -1); |
| 391 PrefService::UNSYNCABLE_PREF); | 391 local_state->RegisterBooleanPref(kEulaAccepted, false); |
| 392 local_state->RegisterIntegerPref(kDeviceRegistered, | 392 local_state->RegisterStringPref(kInitialLocale, "en-US"); |
| 393 -1, | |
| 394 PrefService::UNSYNCABLE_PREF); | |
| 395 local_state->RegisterBooleanPref(kEulaAccepted, | |
| 396 false, | |
| 397 PrefService::UNSYNCABLE_PREF); | |
| 398 local_state->RegisterStringPref(kInitialLocale, | |
| 399 "en-US", | |
| 400 PrefService::UNSYNCABLE_PREF); | |
| 401 // Check if the pref is already registered in case | 393 // Check if the pref is already registered in case |
| 402 // Preferences::RegisterUserPrefs runs before this code in the future. | 394 // Preferences::RegisterUserPrefs runs before this code in the future. |
| 403 if (local_state->FindPreference(prefs::kSpokenFeedbackEnabled) == NULL) { | 395 if (local_state->FindPreference(prefs::kSpokenFeedbackEnabled) == NULL) { |
| 404 local_state->RegisterBooleanPref(prefs::kSpokenFeedbackEnabled, | 396 local_state->RegisterBooleanPref(prefs::kSpokenFeedbackEnabled, false); |
| 405 false, | |
| 406 PrefService::UNSYNCABLE_PREF); | |
| 407 } | 397 } |
| 408 if (local_state->FindPreference(prefs::kHighContrastEnabled) == NULL) { | 398 if (local_state->FindPreference(prefs::kHighContrastEnabled) == NULL) { |
| 409 local_state->RegisterBooleanPref(prefs::kHighContrastEnabled, | 399 local_state->RegisterBooleanPref(prefs::kHighContrastEnabled, false); |
| 410 false, | |
| 411 PrefService::UNSYNCABLE_PREF); | |
| 412 } | 400 } |
| 413 if (local_state->FindPreference(prefs::kVirtualKeyboardEnabled) == NULL) { | 401 if (local_state->FindPreference(prefs::kVirtualKeyboardEnabled) == NULL) { |
| 414 local_state->RegisterBooleanPref(prefs::kVirtualKeyboardEnabled, | 402 local_state->RegisterBooleanPref(prefs::kVirtualKeyboardEnabled, false); |
| 415 false, | |
| 416 PrefService::UNSYNCABLE_PREF); | |
| 417 } | 403 } |
| 418 local_state->RegisterBooleanPref(prefs::kOwnerPrimaryMouseButtonRight, false); | 404 local_state->RegisterBooleanPref(prefs::kOwnerPrimaryMouseButtonRight, false); |
| 419 local_state->RegisterBooleanPref(prefs::kOwnerTapToClickEnabled, true); | 405 local_state->RegisterBooleanPref(prefs::kOwnerTapToClickEnabled, true); |
| 420 local_state->RegisterBooleanPref(prefs::kFactoryResetRequested, false); | 406 local_state->RegisterBooleanPref(prefs::kFactoryResetRequested, false); |
| 421 local_state->RegisterStringPref(prefs::kRLZBrand, std::string(), | 407 local_state->RegisterStringPref(prefs::kRLZBrand, std::string()); |
| 422 PrefService::UNSYNCABLE_PREF); | |
| 423 } | 408 } |
| 424 | 409 |
| 425 /////////////////////////////////////////////////////////////////////////////// | 410 /////////////////////////////////////////////////////////////////////////////// |
| 426 // WizardController, ExitHandlers: | 411 // WizardController, ExitHandlers: |
| 427 void WizardController::OnNetworkConnected() { | 412 void WizardController::OnNetworkConnected() { |
| 428 if (is_official_build_) { | 413 if (is_official_build_) { |
| 429 if (!IsEulaAccepted()) { | 414 if (!IsEulaAccepted()) { |
| 430 ShowEulaScreen(); | 415 ShowEulaScreen(); |
| 431 } else { | 416 } else { |
| 432 // Possible cases: | 417 // Possible cases: |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 835 return zero_delay_enabled_; | 820 return zero_delay_enabled_; |
| 836 } | 821 } |
| 837 | 822 |
| 838 // static | 823 // static |
| 839 void WizardController::SetZeroDelays() { | 824 void WizardController::SetZeroDelays() { |
| 840 kShowDelayMs = 0; | 825 kShowDelayMs = 0; |
| 841 zero_delay_enabled_ = true; | 826 zero_delay_enabled_ = true; |
| 842 } | 827 } |
| 843 | 828 |
| 844 } // namespace chromeos | 829 } // namespace chromeos |
| OLD | NEW |