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" | |
23 #include "chrome/browser/browser_process.h" | 22 #include "chrome/browser/browser_process.h" |
24 #include "chrome/browser/chrome_notification_types.h" | 23 #include "chrome/browser/chrome_notification_types.h" |
25 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" | 24 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
26 #include "chrome/browser/chromeos/customization_document.h" | 25 #include "chrome/browser/chromeos/customization_document.h" |
27 #include "chrome/browser/chromeos/login/enrollment/enrollment_screen.h" | 26 #include "chrome/browser/chromeos/login/enrollment/enrollment_screen.h" |
28 #include "chrome/browser/chromeos/login/existing_user_controller.h" | 27 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
29 #include "chrome/browser/chromeos/login/helper.h" | 28 #include "chrome/browser/chromeos/login/helper.h" |
30 #include "chrome/browser/chromeos/login/hwid_checker.h" | 29 #include "chrome/browser/chromeos/login/hwid_checker.h" |
31 #include "chrome/browser/chromeos/login/login_display_host.h" | 30 #include "chrome/browser/chromeos/login/login_display_host.h" |
32 #include "chrome/browser/chromeos/login/login_utils.h" | 31 #include "chrome/browser/chromeos/login/login_utils.h" |
(...skipping 18 matching lines...) Expand all Loading... |
51 #include "chrome/browser/profiles/profile.h" | 50 #include "chrome/browser/profiles/profile.h" |
52 #include "chrome/browser/profiles/profile_manager.h" | 51 #include "chrome/browser/profiles/profile_manager.h" |
53 #include "chrome/browser/ui/options/options_util.h" | 52 #include "chrome/browser/ui/options/options_util.h" |
54 #include "chrome/common/chrome_constants.h" | 53 #include "chrome/common/chrome_constants.h" |
55 #include "chrome/common/pref_names.h" | 54 #include "chrome/common/pref_names.h" |
56 #include "chromeos/chromeos_constants.h" | 55 #include "chromeos/chromeos_constants.h" |
57 #include "chromeos/dbus/dbus_thread_manager.h" | 56 #include "chromeos/dbus/dbus_thread_manager.h" |
58 #include "chromeos/dbus/session_manager_client.h" | 57 #include "chromeos/dbus/session_manager_client.h" |
59 #include "chromeos/network/network_state_handler.h" | 58 #include "chromeos/network/network_state_handler.h" |
60 #include "chromeos/settings/cros_settings_names.h" | 59 #include "chromeos/settings/cros_settings_names.h" |
| 60 #include "components/breakpad/app/breakpad_linux.h" |
61 #include "content/public/browser/browser_thread.h" | 61 #include "content/public/browser/browser_thread.h" |
62 #include "ui/base/accelerators/accelerator.h" | 62 #include "ui/base/accelerators/accelerator.h" |
63 #include "ui/base/l10n/l10n_util.h" | 63 #include "ui/base/l10n/l10n_util.h" |
64 | 64 |
65 using content::BrowserThread; | 65 using content::BrowserThread; |
66 | 66 |
67 // If reboot didn't happen, ask user to reboot device manually. | 67 // If reboot didn't happen, ask user to reboot device manually. |
68 const int kWaitForRebootTimeSec = 3; | 68 const int kWaitForRebootTimeSec = 3; |
69 | 69 |
70 // Interval in ms which is used for smooth screen showing. | 70 // Interval in ms which is used for smooth screen showing. |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 time_eula_accepted_ = base::Time::Now(); | 475 time_eula_accepted_ = base::Time::Now(); |
476 StartupUtils::MarkEulaAccepted(); | 476 StartupUtils::MarkEulaAccepted(); |
477 bool uma_enabled = | 477 bool uma_enabled = |
478 OptionsUtil::ResolveMetricsReportingEnabled(usage_statistics_reporting_); | 478 OptionsUtil::ResolveMetricsReportingEnabled(usage_statistics_reporting_); |
479 | 479 |
480 CrosSettings::Get()->SetBoolean(kStatsReportingPref, uma_enabled); | 480 CrosSettings::Get()->SetBoolean(kStatsReportingPref, uma_enabled); |
481 if (uma_enabled) { | 481 if (uma_enabled) { |
482 #if defined(GOOGLE_CHROME_BUILD) | 482 #if defined(GOOGLE_CHROME_BUILD) |
483 // The crash reporter initialization needs IO to complete. | 483 // The crash reporter initialization needs IO to complete. |
484 base::ThreadRestrictions::ScopedAllowIO allow_io; | 484 base::ThreadRestrictions::ScopedAllowIO allow_io; |
485 InitCrashReporter(); | 485 breakpad::InitCrashReporter(); |
486 #endif | 486 #endif |
487 } | 487 } |
488 | 488 |
489 if (skip_update_enroll_after_eula_) { | 489 if (skip_update_enroll_after_eula_) { |
490 PerformPostEulaActions(); | 490 PerformPostEulaActions(); |
491 PerformPostUpdateActions(); | 491 PerformPostUpdateActions(); |
492 ShowEnrollmentScreen(); | 492 ShowEnrollmentScreen(); |
493 } else { | 493 } else { |
494 InitiateOOBEUpdate(); | 494 InitiateOOBEUpdate(); |
495 } | 495 } |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
854 ShowErrorScreen(); | 854 ShowErrorScreen(); |
855 } | 855 } |
856 | 856 |
857 PrefService* WizardController::GetLocalState() { | 857 PrefService* WizardController::GetLocalState() { |
858 if (local_state_for_testing_) | 858 if (local_state_for_testing_) |
859 return local_state_for_testing_; | 859 return local_state_for_testing_; |
860 return g_browser_process->local_state(); | 860 return g_browser_process->local_state(); |
861 } | 861 } |
862 | 862 |
863 } // namespace chromeos | 863 } // namespace chromeos |
OLD | NEW |