Chromium Code Reviews| 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 28 matching lines...) Expand all Loading... | |
| 39 #include "chrome/browser/chromeos/login/user_manager.h" | 39 #include "chrome/browser/chromeos/login/user_manager.h" |
| 40 #include "chrome/browser/chromeos/settings/cros_settings.h" | 40 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 41 #include "chrome/browser/chromeos/settings/cros_settings_names.h" | 41 #include "chrome/browser/chromeos/settings/cros_settings_names.h" |
| 42 #include "chrome/browser/prefs/pref_service.h" | 42 #include "chrome/browser/prefs/pref_service.h" |
| 43 #include "chrome/browser/profiles/profile_manager.h" | 43 #include "chrome/browser/profiles/profile_manager.h" |
| 44 #include "chrome/browser/ui/options/options_util.h" | 44 #include "chrome/browser/ui/options/options_util.h" |
| 45 #include "chrome/common/chrome_notification_types.h" | 45 #include "chrome/common/chrome_notification_types.h" |
| 46 #include "chrome/common/pref_names.h" | 46 #include "chrome/common/pref_names.h" |
| 47 #include "content/public/browser/browser_thread.h" | 47 #include "content/public/browser/browser_thread.h" |
| 48 #include "content/public/browser/notification_service.h" | 48 #include "content/public/browser/notification_service.h" |
| 49 #include "content/public/browser/notification_source.h" | |
| 49 #include "content/public/browser/notification_types.h" | 50 #include "content/public/browser/notification_types.h" |
| 50 #include "ui/base/accelerators/accelerator.h" | 51 #include "ui/base/accelerators/accelerator.h" |
| 51 #include "ui/base/l10n/l10n_util.h" | 52 #include "ui/base/l10n/l10n_util.h" |
| 52 | 53 |
| 53 #if defined(USE_LINUX_BREAKPAD) | 54 #if defined(USE_LINUX_BREAKPAD) |
| 54 #include "chrome/app/breakpad_linux.h" | 55 #include "chrome/app/breakpad_linux.h" |
| 55 #endif | 56 #endif |
| 56 | 57 |
| 57 using content::BrowserThread; | 58 using content::BrowserThread; |
| 58 | 59 |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 455 | 456 |
| 456 void WizardController::OnUpdateCompleted() { | 457 void WizardController::OnUpdateCompleted() { |
| 457 OnOOBECompleted(); | 458 OnOOBECompleted(); |
| 458 } | 459 } |
| 459 | 460 |
| 460 void WizardController::OnEulaAccepted() { | 461 void WizardController::OnEulaAccepted() { |
| 461 time_eula_accepted_ = base::Time::Now(); | 462 time_eula_accepted_ = base::Time::Now(); |
| 462 MarkEulaAccepted(); | 463 MarkEulaAccepted(); |
| 463 bool enabled = | 464 bool enabled = |
| 464 OptionsUtil::ResolveMetricsReportingEnabled(usage_statistics_reporting_); | 465 OptionsUtil::ResolveMetricsReportingEnabled(usage_statistics_reporting_); |
| 466 | |
| 467 content::NotificationService::current()->Notify( | |
| 468 chrome::NOTIFICATION_WIZARD_EULA_ACCEPTED, | |
| 469 content::NotificationSource(content::Source<WizardController>(this)), | |
|
Nikita (slow)
2012/09/25 16:23:46
As you're essentially using AllSources in Resource
SteveT
2012/09/25 18:49:11
This was suggested by Ilya. I believe we want to b
| |
| 470 content::NotificationService::NoDetails()); | |
| 471 | |
| 465 CrosSettings::Get()->SetBoolean(kStatsReportingPref, enabled); | 472 CrosSettings::Get()->SetBoolean(kStatsReportingPref, enabled); |
| 466 if (enabled) { | 473 if (enabled) { |
| 467 #if defined(USE_LINUX_BREAKPAD) | 474 #if defined(USE_LINUX_BREAKPAD) |
| 468 // The crash reporter initialization needs IO to complete. | 475 // The crash reporter initialization needs IO to complete. |
| 469 base::ThreadRestrictions::ScopedAllowIO allow_io; | 476 base::ThreadRestrictions::ScopedAllowIO allow_io; |
| 470 InitCrashReporter(); | 477 InitCrashReporter(); |
| 471 #endif | 478 #endif |
| 472 } | 479 } |
| 473 | 480 |
| 474 if (skip_update_enroll_after_eula_) { | 481 if (skip_update_enroll_after_eula_) { |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 831 return zero_delay_enabled_; | 838 return zero_delay_enabled_; |
| 832 } | 839 } |
| 833 | 840 |
| 834 // static | 841 // static |
| 835 void WizardController::SetZeroDelays() { | 842 void WizardController::SetZeroDelays() { |
| 836 kShowDelayMs = 0; | 843 kShowDelayMs = 0; |
| 837 zero_delay_enabled_ = true; | 844 zero_delay_enabled_ = true; |
| 838 } | 845 } |
| 839 | 846 |
| 840 } // namespace chromeos | 847 } // namespace chromeos |
| OLD | NEW |