Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: chrome/browser/chromeos/login/wizard_controller.cc

Issue 16129004: Consolidate EulaAcceptedNotifier implementations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 void WizardController::OnUpdateCompleted() { 465 void WizardController::OnUpdateCompleted() {
466 OnOOBECompleted(); 466 OnOOBECompleted();
467 } 467 }
468 468
469 void WizardController::OnEulaAccepted() { 469 void WizardController::OnEulaAccepted() {
470 time_eula_accepted_ = base::Time::Now(); 470 time_eula_accepted_ = base::Time::Now();
471 StartupUtils::MarkEulaAccepted(); 471 StartupUtils::MarkEulaAccepted();
472 bool uma_enabled = 472 bool uma_enabled =
473 OptionsUtil::ResolveMetricsReportingEnabled(usage_statistics_reporting_); 473 OptionsUtil::ResolveMetricsReportingEnabled(usage_statistics_reporting_);
474 474
475 content::NotificationService::current()->Notify(
476 chrome::NOTIFICATION_WIZARD_EULA_ACCEPTED,
477 content::NotificationSource(content::Source<WizardController>(this)),
478 content::NotificationService::NoDetails());
479
480 CrosSettings::Get()->SetBoolean(kStatsReportingPref, uma_enabled); 475 CrosSettings::Get()->SetBoolean(kStatsReportingPref, uma_enabled);
481 if (uma_enabled) { 476 if (uma_enabled) {
482 #if defined(USE_LINUX_BREAKPAD) && defined(GOOGLE_CHROME_BUILD) 477 #if defined(USE_LINUX_BREAKPAD) && defined(GOOGLE_CHROME_BUILD)
483 // The crash reporter initialization needs IO to complete. 478 // The crash reporter initialization needs IO to complete.
484 base::ThreadRestrictions::ScopedAllowIO allow_io; 479 base::ThreadRestrictions::ScopedAllowIO allow_io;
485 InitCrashReporter(); 480 InitCrashReporter();
486 #endif 481 #endif
487 } 482 }
488 483
489 if (skip_update_enroll_after_eula_) { 484 if (skip_update_enroll_after_eula_) {
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 return zero_delay_enabled_; 792 return zero_delay_enabled_;
798 } 793 }
799 794
800 // static 795 // static
801 void WizardController::SetZeroDelays() { 796 void WizardController::SetZeroDelays() {
802 kShowDelayMs = 0; 797 kShowDelayMs = 0;
803 zero_delay_enabled_ = true; 798 zero_delay_enabled_ = true;
804 } 799 }
805 800
806 } // namespace chromeos 801 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698