Index: chrome/browser/metrics/variations/eula_accepted_notifier_mobile.cc |
=================================================================== |
--- chrome/browser/metrics/variations/eula_accepted_notifier_mobile.cc (revision 194221) |
+++ chrome/browser/metrics/variations/eula_accepted_notifier_mobile.cc (working copy) |
@@ -7,13 +7,8 @@ |
#include "base/bind.h" |
#include "base/prefs/pref_service.h" |
#include "chrome/browser/browser_process.h" |
+#include "chrome/common/pref_names.h" |
-namespace { |
- |
-const char kEulaAccepted[] = "EulaAccepted"; |
- |
-} // namespace |
- |
EulaAcceptedNotifierMobile::EulaAcceptedNotifierMobile( |
PrefService* local_state) |
: local_state_(local_state) { |
@@ -23,13 +18,13 @@ |
} |
bool EulaAcceptedNotifierMobile::IsEulaAccepted() { |
- if (local_state_->GetBoolean(kEulaAccepted)) |
+ if (local_state_->GetBoolean(prefs::kEulaAccepted)) |
return true; |
// Register for the notification, if this is the first time. |
if (registrar_.IsEmpty()) { |
registrar_.Init(local_state_); |
- registrar_.Add(kEulaAccepted, |
+ registrar_.Add(prefs::kEulaAccepted, |
base::Bind(&EulaAcceptedNotifierMobile::OnPrefChanged, |
base::Unretained(this))); |
} |
@@ -40,7 +35,7 @@ |
DCHECK(!registrar_.IsEmpty()); |
registrar_.RemoveAll(); |
- DCHECK(local_state_->GetBoolean(kEulaAccepted)); |
+ DCHECK(local_state_->GetBoolean(prefs::kEulaAccepted)); |
NotifyObserver(); |
} |
@@ -50,7 +45,7 @@ |
// If the |kEulaAccepted| pref is not registered, return NULL which is |
// equivalent to not needing to check the EULA. This is the case for some |
// tests for higher-level classes that use the EulaAcceptNotifier. |
- if (local_state->FindPreference(kEulaAccepted) == NULL) |
+ if (local_state->FindPreference(prefs::kEulaAccepted) == NULL) |
return NULL; |
return new EulaAcceptedNotifierMobile(local_state); |
} |