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/command_line.h" | 15 #include "base/command_line.h" |
16 #include "base/logging.h" | 16 #include "base/logging.h" |
17 #include "base/metrics/histogram.h" | 17 #include "base/metrics/histogram.h" |
18 #include "base/prefs/pref_registry_simple.h" | 18 #include "base/prefs/pref_registry_simple.h" |
19 #include "base/prefs/pref_service.h" | 19 #include "base/prefs/pref_service.h" |
20 #include "base/threading/thread_restrictions.h" | 20 #include "base/threading/thread_restrictions.h" |
21 #include "base/values.h" | 21 #include "base/values.h" |
| 22 #include "chrome/app/breakpad_linux.h" |
22 #include "chrome/browser/browser_process.h" | 23 #include "chrome/browser/browser_process.h" |
23 #include "chrome/browser/chrome_notification_types.h" | 24 #include "chrome/browser/chrome_notification_types.h" |
24 #include "chrome/browser/chromeos/app_mode/kiosk_app_launcher.h" | 25 #include "chrome/browser/chromeos/app_mode/kiosk_app_launcher.h" |
25 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" | 26 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
26 #include "chrome/browser/chromeos/customization_document.h" | 27 #include "chrome/browser/chromeos/customization_document.h" |
27 #include "chrome/browser/chromeos/login/enrollment/enrollment_screen.h" | 28 #include "chrome/browser/chromeos/login/enrollment/enrollment_screen.h" |
28 #include "chrome/browser/chromeos/login/existing_user_controller.h" | 29 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
29 #include "chrome/browser/chromeos/login/helper.h" | 30 #include "chrome/browser/chromeos/login/helper.h" |
30 #include "chrome/browser/chromeos/login/hwid_checker.h" | 31 #include "chrome/browser/chromeos/login/hwid_checker.h" |
31 #include "chrome/browser/chromeos/login/login_display_host.h" | 32 #include "chrome/browser/chromeos/login/login_display_host.h" |
(...skipping 26 matching lines...) Expand all Loading... |
58 #include "chromeos/dbus/dbus_thread_manager.h" | 59 #include "chromeos/dbus/dbus_thread_manager.h" |
59 #include "chromeos/dbus/session_manager_client.h" | 60 #include "chromeos/dbus/session_manager_client.h" |
60 #include "chromeos/network/network_state_handler.h" | 61 #include "chromeos/network/network_state_handler.h" |
61 #include "content/public/browser/browser_thread.h" | 62 #include "content/public/browser/browser_thread.h" |
62 #include "content/public/browser/notification_service.h" | 63 #include "content/public/browser/notification_service.h" |
63 #include "content/public/browser/notification_source.h" | 64 #include "content/public/browser/notification_source.h" |
64 #include "content/public/browser/notification_types.h" | 65 #include "content/public/browser/notification_types.h" |
65 #include "ui/base/accelerators/accelerator.h" | 66 #include "ui/base/accelerators/accelerator.h" |
66 #include "ui/base/l10n/l10n_util.h" | 67 #include "ui/base/l10n/l10n_util.h" |
67 | 68 |
68 #if defined(USE_LINUX_BREAKPAD) | |
69 #include "chrome/app/breakpad_linux.h" | |
70 #endif | |
71 | |
72 using content::BrowserThread; | 69 using content::BrowserThread; |
73 | 70 |
74 namespace { | 71 namespace { |
75 | 72 |
76 // A string pref with initial locale set in VPD or manifest. | 73 // A string pref with initial locale set in VPD or manifest. |
77 const char kInitialLocale[] = "intl.initial_locale"; | 74 const char kInitialLocale[] = "intl.initial_locale"; |
78 | 75 |
79 // A boolean pref of the OOBE complete flag (first OOBE part before login). | 76 // A boolean pref of the OOBE complete flag (first OOBE part before login). |
80 const char kOobeComplete[] = "OobeComplete"; | 77 const char kOobeComplete[] = "OobeComplete"; |
81 | 78 |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 } | 488 } |
492 | 489 |
493 void WizardController::OnEulaAccepted() { | 490 void WizardController::OnEulaAccepted() { |
494 time_eula_accepted_ = base::Time::Now(); | 491 time_eula_accepted_ = base::Time::Now(); |
495 StartupUtils::MarkEulaAccepted(); | 492 StartupUtils::MarkEulaAccepted(); |
496 bool uma_enabled = | 493 bool uma_enabled = |
497 OptionsUtil::ResolveMetricsReportingEnabled(usage_statistics_reporting_); | 494 OptionsUtil::ResolveMetricsReportingEnabled(usage_statistics_reporting_); |
498 | 495 |
499 CrosSettings::Get()->SetBoolean(kStatsReportingPref, uma_enabled); | 496 CrosSettings::Get()->SetBoolean(kStatsReportingPref, uma_enabled); |
500 if (uma_enabled) { | 497 if (uma_enabled) { |
501 #if defined(USE_LINUX_BREAKPAD) && defined(GOOGLE_CHROME_BUILD) | 498 #if defined(GOOGLE_CHROME_BUILD) |
502 // The crash reporter initialization needs IO to complete. | 499 // The crash reporter initialization needs IO to complete. |
503 base::ThreadRestrictions::ScopedAllowIO allow_io; | 500 base::ThreadRestrictions::ScopedAllowIO allow_io; |
504 InitCrashReporter(); | 501 InitCrashReporter(); |
505 #endif | 502 #endif |
506 } | 503 } |
507 | 504 |
508 if (skip_update_enroll_after_eula_) { | 505 if (skip_update_enroll_after_eula_) { |
509 PerformPostEulaActions(); | 506 PerformPostEulaActions(); |
510 PerformPostUpdateActions(); | 507 PerformPostUpdateActions(); |
511 ShowEnrollmentScreen(); | 508 ShowEnrollmentScreen(); |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
856 return g_browser_process->browser_policy_connector()-> | 853 return g_browser_process->browser_policy_connector()-> |
857 GetDeviceCloudPolicyManager()->ShouldAutoStartEnrollment(); | 854 GetDeviceCloudPolicyManager()->ShouldAutoStartEnrollment(); |
858 } | 855 } |
859 | 856 |
860 bool WizardController::CanExitEnrollment() const { | 857 bool WizardController::CanExitEnrollment() const { |
861 return g_browser_process->browser_policy_connector()-> | 858 return g_browser_process->browser_policy_connector()-> |
862 GetDeviceCloudPolicyManager()->CanExitEnrollment(); | 859 GetDeviceCloudPolicyManager()->CanExitEnrollment(); |
863 } | 860 } |
864 | 861 |
865 } // namespace chromeos | 862 } // namespace chromeos |
OLD | NEW |