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

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

Issue 10917120: Activate the VariationsService for ChromeOS and ensure that it does not ping the server until the E… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: asvit nit 2 Created 8 years, 3 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
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 27 matching lines...) Expand all
38 #include "chrome/browser/chromeos/login/user_manager.h" 38 #include "chrome/browser/chromeos/login/user_manager.h"
39 #include "chrome/browser/chromeos/settings/cros_settings.h" 39 #include "chrome/browser/chromeos/settings/cros_settings.h"
40 #include "chrome/browser/chromeos/settings/cros_settings_names.h" 40 #include "chrome/browser/chromeos/settings/cros_settings_names.h"
41 #include "chrome/browser/prefs/pref_service.h" 41 #include "chrome/browser/prefs/pref_service.h"
42 #include "chrome/browser/profiles/profile_manager.h" 42 #include "chrome/browser/profiles/profile_manager.h"
43 #include "chrome/browser/ui/options/options_util.h" 43 #include "chrome/browser/ui/options/options_util.h"
44 #include "chrome/common/chrome_notification_types.h" 44 #include "chrome/common/chrome_notification_types.h"
45 #include "chrome/common/pref_names.h" 45 #include "chrome/common/pref_names.h"
46 #include "content/public/browser/browser_thread.h" 46 #include "content/public/browser/browser_thread.h"
47 #include "content/public/browser/notification_service.h" 47 #include "content/public/browser/notification_service.h"
48 #include "content/public/browser/notification_source.h"
48 #include "content/public/browser/notification_types.h" 49 #include "content/public/browser/notification_types.h"
49 #include "ui/base/accelerators/accelerator.h" 50 #include "ui/base/accelerators/accelerator.h"
50 #include "ui/base/l10n/l10n_util.h" 51 #include "ui/base/l10n/l10n_util.h"
51 52
52 #if defined(USE_LINUX_BREAKPAD) 53 #if defined(USE_LINUX_BREAKPAD)
53 #include "chrome/app/breakpad_linux.h" 54 #include "chrome/app/breakpad_linux.h"
54 #endif 55 #endif
55 56
56 using content::BrowserThread; 57 using content::BrowserThread;
57 58
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 436
436 void WizardController::OnUpdateCompleted() { 437 void WizardController::OnUpdateCompleted() {
437 OnOOBECompleted(); 438 OnOOBECompleted();
438 } 439 }
439 440
440 void WizardController::OnEulaAccepted() { 441 void WizardController::OnEulaAccepted() {
441 time_eula_accepted_ = base::Time::Now(); 442 time_eula_accepted_ = base::Time::Now();
442 MarkEulaAccepted(); 443 MarkEulaAccepted();
443 bool enabled = 444 bool enabled =
444 OptionsUtil::ResolveMetricsReportingEnabled(usage_statistics_reporting_); 445 OptionsUtil::ResolveMetricsReportingEnabled(usage_statistics_reporting_);
446
447 content::NotificationService::current()->Notify(
448 chrome::NOTIFICATION_WIZARD_EULA_ACCEPTED,
449 content::NotificationSource(content::Source<WizardController>(this)),
450 content::NotificationService::NoDetails());
451
445 CrosSettings::Get()->SetBoolean(kStatsReportingPref, enabled); 452 CrosSettings::Get()->SetBoolean(kStatsReportingPref, enabled);
446 if (enabled) { 453 if (enabled) {
447 #if defined(USE_LINUX_BREAKPAD) 454 #if defined(USE_LINUX_BREAKPAD)
448 // The crash reporter initialization needs IO to complete. 455 // The crash reporter initialization needs IO to complete.
449 base::ThreadRestrictions::ScopedAllowIO allow_io; 456 base::ThreadRestrictions::ScopedAllowIO allow_io;
450 InitCrashReporter(); 457 InitCrashReporter();
451 #endif 458 #endif
452 } 459 }
453 460
454 if (skip_update_enroll_after_eula_) { 461 if (skip_update_enroll_after_eula_) {
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 return zero_delay_enabled_; 805 return zero_delay_enabled_;
799 } 806 }
800 807
801 // static 808 // static
802 void WizardController::SetZeroDelays() { 809 void WizardController::SetZeroDelays() {
803 kShowDelayMs = 0; 810 kShowDelayMs = 0;
804 zero_delay_enabled_ = true; 811 zero_delay_enabled_ = true;
805 } 812 }
806 813
807 } // namespace chromeos 814 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698