| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 #include "chrome/browser/chromeos/login/screens/wrong_hwid_screen.h" | 46 #include "chrome/browser/chromeos/login/screens/wrong_hwid_screen.h" |
| 47 #include "chrome/browser/chromeos/login/startup_utils.h" | 47 #include "chrome/browser/chromeos/login/startup_utils.h" |
| 48 #include "chrome/browser/chromeos/login/ui/login_display_host.h" | 48 #include "chrome/browser/chromeos/login/ui/login_display_host.h" |
| 49 #include "chrome/browser/chromeos/login/ui/oobe_display.h" | 49 #include "chrome/browser/chromeos/login/ui/oobe_display.h" |
| 50 #include "chrome/browser/chromeos/login/users/user_manager.h" | 50 #include "chrome/browser/chromeos/login/users/user_manager.h" |
| 51 #include "chrome/browser/chromeos/net/delay_network_call.h" | 51 #include "chrome/browser/chromeos/net/delay_network_call.h" |
| 52 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 52 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 53 #include "chrome/browser/chromeos/policy/device_cloud_policy_initializer.h" | 53 #include "chrome/browser/chromeos/policy/device_cloud_policy_initializer.h" |
| 54 #include "chrome/browser/chromeos/settings/cros_settings.h" | 54 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 55 #include "chrome/browser/chromeos/timezone/timezone_provider.h" | 55 #include "chrome/browser/chromeos/timezone/timezone_provider.h" |
| 56 #include "chrome/browser/metrics/metrics_reporting_state.h" |
| 56 #include "chrome/browser/profiles/profile.h" | 57 #include "chrome/browser/profiles/profile.h" |
| 57 #include "chrome/browser/profiles/profile_manager.h" | 58 #include "chrome/browser/profiles/profile_manager.h" |
| 58 #include "chrome/browser/ui/options/options_util.h" | |
| 59 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" | 59 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
| 60 #include "chrome/common/chrome_constants.h" | 60 #include "chrome/common/chrome_constants.h" |
| 61 #include "chrome/common/pref_names.h" | 61 #include "chrome/common/pref_names.h" |
| 62 #include "chromeos/audio/cras_audio_handler.h" | 62 #include "chromeos/audio/cras_audio_handler.h" |
| 63 #include "chromeos/chromeos_constants.h" | 63 #include "chromeos/chromeos_constants.h" |
| 64 #include "chromeos/chromeos_switches.h" | 64 #include "chromeos/chromeos_switches.h" |
| 65 #include "chromeos/dbus/dbus_thread_manager.h" | 65 #include "chromeos/dbus/dbus_thread_manager.h" |
| 66 #include "chromeos/dbus/session_manager_client.h" | 66 #include "chromeos/dbus/session_manager_client.h" |
| 67 #include "chromeos/network/network_state.h" | 67 #include "chromeos/network/network_state.h" |
| 68 #include "chromeos/network/network_state_handler.h" | 68 #include "chromeos/network/network_state_handler.h" |
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 } | 594 } |
| 595 | 595 |
| 596 void WizardController::OnUpdateCompleted() { | 596 void WizardController::OnUpdateCompleted() { |
| 597 ShowAutoEnrollmentCheckScreen(); | 597 ShowAutoEnrollmentCheckScreen(); |
| 598 } | 598 } |
| 599 | 599 |
| 600 void WizardController::OnEulaAccepted() { | 600 void WizardController::OnEulaAccepted() { |
| 601 time_eula_accepted_ = base::Time::Now(); | 601 time_eula_accepted_ = base::Time::Now(); |
| 602 StartupUtils::MarkEulaAccepted(); | 602 StartupUtils::MarkEulaAccepted(); |
| 603 bool uma_enabled = | 603 bool uma_enabled = |
| 604 OptionsUtil::ResolveMetricsReportingEnabled(usage_statistics_reporting_); | 604 ResolveMetricsReportingEnabled(usage_statistics_reporting_); |
| 605 | 605 |
| 606 CrosSettings::Get()->SetBoolean(kStatsReportingPref, uma_enabled); | 606 CrosSettings::Get()->SetBoolean(kStatsReportingPref, uma_enabled); |
| 607 if (uma_enabled) { | 607 if (uma_enabled) { |
| 608 #if defined(GOOGLE_CHROME_BUILD) | 608 #if defined(GOOGLE_CHROME_BUILD) |
| 609 // The crash reporter initialization needs IO to complete. | 609 // The crash reporter initialization needs IO to complete. |
| 610 base::ThreadRestrictions::ScopedAllowIO allow_io; | 610 base::ThreadRestrictions::ScopedAllowIO allow_io; |
| 611 breakpad::InitCrashReporter(std::string()); | 611 breakpad::InitCrashReporter(std::string()); |
| 612 #endif | 612 #endif |
| 613 } | 613 } |
| 614 | 614 |
| (...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1177 bool WizardController::SetOnTimeZoneResolvedForTesting( | 1177 bool WizardController::SetOnTimeZoneResolvedForTesting( |
| 1178 const base::Closure& callback) { | 1178 const base::Closure& callback) { |
| 1179 if (timezone_resolved_) | 1179 if (timezone_resolved_) |
| 1180 return false; | 1180 return false; |
| 1181 | 1181 |
| 1182 on_timezone_resolved_for_testing_ = callback; | 1182 on_timezone_resolved_for_testing_ = callback; |
| 1183 return true; | 1183 return true; |
| 1184 } | 1184 } |
| 1185 | 1185 |
| 1186 } // namespace chromeos | 1186 } // namespace chromeos |
| OLD | NEW |