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

Side by Side Diff: chrome/browser/metrics/variations/eula_accepted_notifier_chromeos.cc

Issue 14362031: Move part of WizardController static code to StartupUtils (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fighting with whitespaces again Created 7 years, 8 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/metrics/variations/eula_accepted_notifier_chromeos.h" 5 #include "chrome/browser/metrics/variations/eula_accepted_notifier_chromeos.h"
6 6
7 #include "chrome/browser/chromeos/login/wizard_controller.h" 7 #include "base/logging.h"
8 #include "chrome/browser/chromeos/login/startup_utils.h"
8 #include "chrome/common/chrome_notification_types.h" 9 #include "chrome/common/chrome_notification_types.h"
9 #include "content/public/browser/notification_service.h" 10 #include "content/public/browser/notification_service.h"
10 11
11 EulaAcceptedNotifierChromeos::EulaAcceptedNotifierChromeos() { 12 EulaAcceptedNotifierChromeos::EulaAcceptedNotifierChromeos() {
12 } 13 }
13 14
14 EulaAcceptedNotifierChromeos::~EulaAcceptedNotifierChromeos() { 15 EulaAcceptedNotifierChromeos::~EulaAcceptedNotifierChromeos() {
15 } 16 }
16 17
17 bool EulaAcceptedNotifierChromeos::IsEulaAccepted() { 18 bool EulaAcceptedNotifierChromeos::IsEulaAccepted() {
18 if (chromeos::WizardController::IsEulaAccepted()) 19 if (chromeos::StartupUtils::IsEulaAccepted())
19 return true; 20 return true;
20 21
21 // Register for the notification, if this is the first time. 22 // Register for the notification, if this is the first time.
22 if (registrar_.IsEmpty()) { 23 if (registrar_.IsEmpty()) {
23 // Note that this must listen on AllSources due to the difficulty in knowing 24 // Note that this must listen on AllSources due to the difficulty in knowing
24 // when the WizardController instance is created, and to avoid over-coupling 25 // when the WizardController instance is created, and to avoid over-coupling
25 // the Chrome OS code with the VariationsService by directly attaching as an 26 // the Chrome OS code with the VariationsService by directly attaching as an
26 // observer. This is OK because WizardController is essentially a singleton. 27 // observer. This is OK because WizardController is essentially a singleton.
27 registrar_.Add(this, chrome::NOTIFICATION_WIZARD_EULA_ACCEPTED, 28 registrar_.Add(this, chrome::NOTIFICATION_WIZARD_EULA_ACCEPTED,
28 content::NotificationService::AllSources()); 29 content::NotificationService::AllSources());
(...skipping 15 matching lines...) Expand all
44 } 45 }
45 46
46 // static 47 // static
47 EulaAcceptedNotifier* EulaAcceptedNotifier::Create() { 48 EulaAcceptedNotifier* EulaAcceptedNotifier::Create() {
48 #if defined(GOOGLE_CHROME_BUILD) 49 #if defined(GOOGLE_CHROME_BUILD)
49 return new EulaAcceptedNotifierChromeos; 50 return new EulaAcceptedNotifierChromeos;
50 #else 51 #else
51 return NULL; 52 return NULL;
52 #endif 53 #endif
53 } 54 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/system/tray_accessibility_browsertest.cc ('k') | chrome/browser/prefs/browser_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698