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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdlib.h> | 9 #include <stdlib.h> |
| 10 #include <sys/types.h> | 10 #include <sys/types.h> |
| (...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 625 } else if (IsControllerDetected()) { | 625 } else if (IsControllerDetected()) { |
| 626 ShowHostPairingScreen(); | 626 ShowHostPairingScreen(); |
| 627 } else { | 627 } else { |
| 628 ShowAutoEnrollmentCheckScreen(); | 628 ShowAutoEnrollmentCheckScreen(); |
| 629 } | 629 } |
| 630 } | 630 } |
| 631 | 631 |
| 632 void WizardController::OnEulaAccepted() { | 632 void WizardController::OnEulaAccepted() { |
| 633 time_eula_accepted_ = base::Time::Now(); | 633 time_eula_accepted_ = base::Time::Now(); |
| 634 StartupUtils::MarkEulaAccepted(); | 634 StartupUtils::MarkEulaAccepted(); |
| 635 InitiateMetricsReportingChange( | 635 ChangeMetricsReportingStateWithReply( |
| 636 usage_statistics_reporting_, | 636 usage_statistics_reporting_, |
| 637 base::Bind(&WizardController::InitiateMetricsReportingChangeCallback, | 637 base::Bind(&WizardController::OnChangeMetricsReportingState, |
| 638 weak_factory_.GetWeakPtr())); | 638 weak_factory_.GetWeakPtr())); |
| 639 PerformPostEulaActions(); | 639 PerformPostEulaActions(); |
| 640 | 640 |
| 641 if (skip_update_enroll_after_eula_) { | 641 if (skip_update_enroll_after_eula_) { |
| 642 ShowAutoEnrollmentCheckScreen(); | 642 ShowAutoEnrollmentCheckScreen(); |
| 643 } else { | 643 } else { |
| 644 InitiateOOBEUpdate(); | 644 InitiateOOBEUpdate(); |
| 645 } | 645 } |
| 646 } | 646 } |
| 647 | 647 |
| 648 void WizardController::InitiateMetricsReportingChangeCallback(bool enabled) { | 648 void WizardController::OnChangeMetricsReportingState(bool enabled) { |
|
Ilya Sherman
2016/08/05 03:39:06
nit: Probably name this either "OnDidChange" or "O
gayane -on leave until 09-2017
2016/08/05 17:31:43
Done.
| |
| 649 CrosSettings::Get()->SetBoolean(kStatsReportingPref, enabled); | 649 CrosSettings::Get()->SetBoolean(kStatsReportingPref, enabled); |
| 650 if (!enabled) | 650 if (!enabled) |
| 651 return; | 651 return; |
| 652 #if defined(GOOGLE_CHROME_BUILD) | 652 #if defined(GOOGLE_CHROME_BUILD) |
| 653 if (!content::BrowserThread::PostBlockingPoolTask( | 653 if (!content::BrowserThread::PostBlockingPoolTask( |
| 654 FROM_HERE, base::Bind(&InitializeCrashReporter))) { | 654 FROM_HERE, base::Bind(&InitializeCrashReporter))) { |
| 655 LOG(ERROR) << "Failed to start crash reporter initialization."; | 655 LOG(ERROR) << "Failed to start crash reporter initialization."; |
| 656 } | 656 } |
| 657 #endif | 657 #endif |
| 658 } | 658 } |
| (...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1389 : policy::EnrollmentConfig::MODE_MANUAL_REENROLLMENT; | 1389 : policy::EnrollmentConfig::MODE_MANUAL_REENROLLMENT; |
| 1390 } | 1390 } |
| 1391 | 1391 |
| 1392 EnrollmentScreen* screen = EnrollmentScreen::Get(this); | 1392 EnrollmentScreen* screen = EnrollmentScreen::Get(this); |
| 1393 screen->SetParameters(effective_config, shark_controller_.get()); | 1393 screen->SetParameters(effective_config, shark_controller_.get()); |
| 1394 SetStatusAreaVisible(true); | 1394 SetStatusAreaVisible(true); |
| 1395 SetCurrentScreen(screen); | 1395 SetCurrentScreen(screen); |
| 1396 } | 1396 } |
| 1397 | 1397 |
| 1398 } // namespace chromeos | 1398 } // namespace chromeos |
| OLD | NEW |