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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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/login/users/user_manager.h" | 52 #include "chrome/browser/chromeos/login/users/user_manager.h" |
53 #include "chrome/browser/chromeos/net/delay_network_call.h" | 53 #include "chrome/browser/chromeos/net/delay_network_call.h" |
54 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 54 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
55 #include "chrome/browser/chromeos/policy/device_cloud_policy_initializer.h" | 55 #include "chrome/browser/chromeos/policy/device_cloud_policy_initializer.h" |
56 #include "chrome/browser/chromeos/settings/cros_settings.h" | 56 #include "chrome/browser/chromeos/settings/cros_settings.h" |
57 #include "chrome/browser/chromeos/timezone/timezone_provider.h" | 57 #include "chrome/browser/chromeos/timezone/timezone_provider.h" |
58 #include "chrome/browser/lifetime/application_lifetime.h" | 58 #include "chrome/browser/lifetime/application_lifetime.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/options/options_util.h" | |
62 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" | 62 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
63 #include "chrome/common/chrome_constants.h" | 63 #include "chrome/common/chrome_constants.h" |
64 #include "chrome/common/pref_names.h" | 64 #include "chrome/common/pref_names.h" |
65 #include "chromeos/audio/cras_audio_handler.h" | 65 #include "chromeos/audio/cras_audio_handler.h" |
66 #include "chromeos/chromeos_constants.h" | 66 #include "chromeos/chromeos_constants.h" |
67 #include "chromeos/chromeos_switches.h" | 67 #include "chromeos/chromeos_switches.h" |
68 #include "chromeos/dbus/dbus_thread_manager.h" | 68 #include "chromeos/dbus/dbus_thread_manager.h" |
69 #include "chromeos/dbus/session_manager_client.h" | 69 #include "chromeos/dbus/session_manager_client.h" |
70 #include "chromeos/network/network_state.h" | 70 #include "chromeos/network/network_state.h" |
71 #include "chromeos/network/network_state_handler.h" | 71 #include "chromeos/network/network_state_handler.h" |
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
651 ShowHostPairingScreen(); | 651 ShowHostPairingScreen(); |
652 } else { | 652 } else { |
653 ShowAutoEnrollmentCheckScreen(); | 653 ShowAutoEnrollmentCheckScreen(); |
654 } | 654 } |
655 } | 655 } |
656 | 656 |
657 void WizardController::OnEulaAccepted() { | 657 void WizardController::OnEulaAccepted() { |
658 time_eula_accepted_ = base::Time::Now(); | 658 time_eula_accepted_ = base::Time::Now(); |
659 StartupUtils::MarkEulaAccepted(); | 659 StartupUtils::MarkEulaAccepted(); |
660 bool uma_enabled = | 660 bool uma_enabled = |
661 OptionsUtil::ResolveMetricsReportingEnabled(usage_statistics_reporting_); | 661 ResolveMetricsReportingEnabled(usage_statistics_reporting_); |
662 | 662 |
663 CrosSettings::Get()->SetBoolean(kStatsReportingPref, uma_enabled); | 663 CrosSettings::Get()->SetBoolean(kStatsReportingPref, uma_enabled); |
664 if (uma_enabled) { | 664 if (uma_enabled) { |
665 #if defined(GOOGLE_CHROME_BUILD) | 665 #if defined(GOOGLE_CHROME_BUILD) |
666 // The crash reporter initialization needs IO to complete. | 666 // The crash reporter initialization needs IO to complete. |
667 base::ThreadRestrictions::ScopedAllowIO allow_io; | 667 base::ThreadRestrictions::ScopedAllowIO allow_io; |
668 breakpad::InitCrashReporter(std::string()); | 668 breakpad::InitCrashReporter(std::string()); |
669 #endif | 669 #endif |
670 } | 670 } |
671 | 671 |
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1275 bool WizardController::SetOnTimeZoneResolvedForTesting( | 1275 bool WizardController::SetOnTimeZoneResolvedForTesting( |
1276 const base::Closure& callback) { | 1276 const base::Closure& callback) { |
1277 if (timezone_resolved_) | 1277 if (timezone_resolved_) |
1278 return false; | 1278 return false; |
1279 | 1279 |
1280 on_timezone_resolved_for_testing_ = callback; | 1280 on_timezone_resolved_for_testing_ = callback; |
1281 return true; | 1281 return true; |
1282 } | 1282 } |
1283 | 1283 |
1284 } // namespace chromeos | 1284 } // namespace chromeos |
OLD | NEW |