| 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 |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/bind.h" | 14 #include "base/bind.h" |
| 15 #include "base/chromeos/chromeos_version.h" | 15 #include "base/chromeos/chromeos_version.h" |
| 16 #include "base/command_line.h" | 16 #include "base/command_line.h" |
| 17 #include "base/logging.h" | 17 #include "base/logging.h" |
| 18 #include "base/metrics/histogram.h" | 18 #include "base/metrics/histogram.h" |
| 19 #include "base/prefs/pref_registry_simple.h" | 19 #include "base/prefs/pref_registry_simple.h" |
| 20 #include "base/prefs/pref_service.h" | 20 #include "base/prefs/pref_service.h" |
| 21 #include "base/threading/thread_restrictions.h" | 21 #include "base/threading/thread_restrictions.h" |
| 22 #include "base/values.h" | 22 #include "base/values.h" |
| 23 #include "chrome/browser/browser_process.h" | 23 #include "chrome/browser/browser_process.h" |
| 24 #include "chrome/browser/chromeos/app_mode/kiosk_app_launcher.h" | 24 #include "chrome/browser/chromeos/app_mode/kiosk_app_launcher.h" |
| 25 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" | 25 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
| 26 #include "chrome/browser/chromeos/cros/cros_library.h" | |
| 27 #include "chrome/browser/chromeos/cros/network_library.h" | |
| 28 #include "chrome/browser/chromeos/customization_document.h" | 26 #include "chrome/browser/chromeos/customization_document.h" |
| 29 #include "chrome/browser/chromeos/login/enrollment/enrollment_screen.h" | 27 #include "chrome/browser/chromeos/login/enrollment/enrollment_screen.h" |
| 30 #include "chrome/browser/chromeos/login/existing_user_controller.h" | 28 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
| 31 #include "chrome/browser/chromeos/login/helper.h" | 29 #include "chrome/browser/chromeos/login/helper.h" |
| 32 #include "chrome/browser/chromeos/login/hwid_checker.h" | 30 #include "chrome/browser/chromeos/login/hwid_checker.h" |
| 33 #include "chrome/browser/chromeos/login/login_display_host.h" | 31 #include "chrome/browser/chromeos/login/login_display_host.h" |
| 34 #include "chrome/browser/chromeos/login/login_utils.h" | 32 #include "chrome/browser/chromeos/login/login_utils.h" |
| 35 #include "chrome/browser/chromeos/login/managed/locally_managed_user_creation_sc
reen.h" | 33 #include "chrome/browser/chromeos/login/managed/locally_managed_user_creation_sc
reen.h" |
| 36 #include "chrome/browser/chromeos/login/oobe_display.h" | 34 #include "chrome/browser/chromeos/login/oobe_display.h" |
| 37 #include "chrome/browser/chromeos/login/screens/error_screen.h" | 35 #include "chrome/browser/chromeos/login/screens/error_screen.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 50 #include "chrome/browser/chromeos/system/statistics_provider.h" | 48 #include "chrome/browser/chromeos/system/statistics_provider.h" |
| 51 #include "chrome/browser/profiles/profile.h" | 49 #include "chrome/browser/profiles/profile.h" |
| 52 #include "chrome/browser/profiles/profile_manager.h" | 50 #include "chrome/browser/profiles/profile_manager.h" |
| 53 #include "chrome/browser/ui/options/options_util.h" | 51 #include "chrome/browser/ui/options/options_util.h" |
| 54 #include "chrome/common/chrome_constants.h" | 52 #include "chrome/common/chrome_constants.h" |
| 55 #include "chrome/common/chrome_notification_types.h" | 53 #include "chrome/common/chrome_notification_types.h" |
| 56 #include "chrome/common/pref_names.h" | 54 #include "chrome/common/pref_names.h" |
| 57 #include "chromeos/chromeos_constants.h" | 55 #include "chromeos/chromeos_constants.h" |
| 58 #include "chromeos/dbus/dbus_thread_manager.h" | 56 #include "chromeos/dbus/dbus_thread_manager.h" |
| 59 #include "chromeos/dbus/session_manager_client.h" | 57 #include "chromeos/dbus/session_manager_client.h" |
| 58 #include "chromeos/network/network_state_handler.h" |
| 60 #include "content/public/browser/browser_thread.h" | 59 #include "content/public/browser/browser_thread.h" |
| 61 #include "content/public/browser/notification_service.h" | 60 #include "content/public/browser/notification_service.h" |
| 62 #include "content/public/browser/notification_source.h" | 61 #include "content/public/browser/notification_source.h" |
| 63 #include "content/public/browser/notification_types.h" | 62 #include "content/public/browser/notification_types.h" |
| 64 #include "ui/base/accelerators/accelerator.h" | 63 #include "ui/base/accelerators/accelerator.h" |
| 65 #include "ui/base/l10n/l10n_util.h" | 64 #include "ui/base/l10n/l10n_util.h" |
| 66 | 65 |
| 67 #if defined(USE_LINUX_BREAKPAD) | 66 #if defined(USE_LINUX_BREAKPAD) |
| 68 #include "chrome/app/breakpad_linux.h" | 67 #include "chrome/app/breakpad_linux.h" |
| 69 #endif | 68 #endif |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 | 601 |
| 603 void WizardController::InitiateOOBEUpdate() { | 602 void WizardController::InitiateOOBEUpdate() { |
| 604 PerformPostEulaActions(); | 603 PerformPostEulaActions(); |
| 605 SetCurrentScreenSmooth(GetUpdateScreen(), true); | 604 SetCurrentScreenSmooth(GetUpdateScreen(), true); |
| 606 GetUpdateScreen()->StartNetworkCheck(); | 605 GetUpdateScreen()->StartNetworkCheck(); |
| 607 } | 606 } |
| 608 | 607 |
| 609 void WizardController::PerformPostEulaActions() { | 608 void WizardController::PerformPostEulaActions() { |
| 610 // Now that EULA has been accepted (for official builds), enable portal check. | 609 // Now that EULA has been accepted (for official builds), enable portal check. |
| 611 // ChromiumOS builds would go though this code path too. | 610 // ChromiumOS builds would go though this code path too. |
| 612 chromeos::CrosLibrary::Get()->GetNetworkLibrary()-> | 611 NetworkHandler::Get()->network_state_handler()->SetCheckPortalList( |
| 613 SetDefaultCheckPortalList(); | 612 NetworkStateHandler::kDefaultCheckPortalList); |
| 614 host_->CheckForAutoEnrollment(); | 613 host_->CheckForAutoEnrollment(); |
| 615 NetworkPortalDetector* detector = NetworkPortalDetector::GetInstance(); | 614 NetworkPortalDetector* detector = NetworkPortalDetector::GetInstance(); |
| 616 if (NetworkPortalDetector::IsEnabledInCommandLine() && detector) | 615 if (NetworkPortalDetector::IsEnabledInCommandLine() && detector) |
| 617 detector->Enable(true); | 616 detector->Enable(true); |
| 618 } | 617 } |
| 619 | 618 |
| 620 void WizardController::PerformPostUpdateActions() { | 619 void WizardController::PerformPostUpdateActions() { |
| 621 StartupUtils::MarkOobeCompleted(); | 620 StartupUtils::MarkOobeCompleted(); |
| 622 } | 621 } |
| 623 | 622 |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 797 return zero_delay_enabled_; | 796 return zero_delay_enabled_; |
| 798 } | 797 } |
| 799 | 798 |
| 800 // static | 799 // static |
| 801 void WizardController::SetZeroDelays() { | 800 void WizardController::SetZeroDelays() { |
| 802 kShowDelayMs = 0; | 801 kShowDelayMs = 0; |
| 803 zero_delay_enabled_ = true; | 802 zero_delay_enabled_ = true; |
| 804 } | 803 } |
| 805 | 804 |
| 806 } // namespace chromeos | 805 } // namespace chromeos |
| OLD | NEW |