summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/chromeos/login/wizard_controller.cc9
-rw-r--r--chrome/browser/metrics/variations/eula_accepted_notifier_mobile.cc15
-rw-r--r--chrome/common/pref_names.cc3
-rw-r--r--chrome/common/pref_names.h2
4 files changed, 13 insertions, 16 deletions
diff --git a/chrome/browser/chromeos/login/wizard_controller.cc b/chrome/browser/chromeos/login/wizard_controller.cc
index bed8265..4795875 100644
--- a/chrome/browser/chromeos/login/wizard_controller.cc
+++ b/chrome/browser/chromeos/login/wizard_controller.cc
@@ -67,9 +67,6 @@ using content::BrowserThread;
namespace {
-// A boolean pref of the EULA accepted flag.
-const char kEulaAccepted[] = "EulaAccepted";
-
// A string pref with initial locale set in VPD or manifest.
const char kInitialLocale[] = "intl.initial_locale";
@@ -424,7 +421,7 @@ void WizardController::SkipUpdateEnrollAfterEula() {
void WizardController::RegisterPrefs(PrefRegistrySimple* registry) {
registry->RegisterBooleanPref(kOobeComplete, false);
registry->RegisterIntegerPref(kDeviceRegistered, -1);
- registry->RegisterBooleanPref(kEulaAccepted, false);
+ registry->RegisterBooleanPref(prefs::kEulaAccepted, false);
registry->RegisterStringPref(kInitialLocale, "en-US");
}
@@ -701,7 +698,7 @@ void WizardController::AdvanceToScreen(const std::string& screen_name) {
// static
bool WizardController::IsEulaAccepted() {
- return g_browser_process->local_state()->GetBoolean(kEulaAccepted);
+ return g_browser_process->local_state()->GetBoolean(prefs::kEulaAccepted);
}
// static
@@ -711,7 +708,7 @@ bool WizardController::IsOobeCompleted() {
// static
void WizardController::MarkEulaAccepted() {
- SaveBoolPreferenceForced(kEulaAccepted, true);
+ SaveBoolPreferenceForced(prefs::kEulaAccepted, true);
}
// static
diff --git a/chrome/browser/metrics/variations/eula_accepted_notifier_mobile.cc b/chrome/browser/metrics/variations/eula_accepted_notifier_mobile.cc
index e86c38d..cb5ab2d 100644
--- a/chrome/browser/metrics/variations/eula_accepted_notifier_mobile.cc
+++ b/chrome/browser/metrics/variations/eula_accepted_notifier_mobile.cc
@@ -7,12 +7,7 @@
#include "base/bind.h"
#include "base/prefs/pref_service.h"
#include "chrome/browser/browser_process.h"
-
-namespace {
-
-const char kEulaAccepted[] = "EulaAccepted";
-
-} // namespace
+#include "chrome/common/pref_names.h"
EulaAcceptedNotifierMobile::EulaAcceptedNotifierMobile(
PrefService* local_state)
@@ -23,13 +18,13 @@ EulaAcceptedNotifierMobile::~EulaAcceptedNotifierMobile() {
}
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 @@ void EulaAcceptedNotifierMobile::OnPrefChanged() {
DCHECK(!registrar_.IsEmpty());
registrar_.RemoveAll();
- DCHECK(local_state_->GetBoolean(kEulaAccepted));
+ DCHECK(local_state_->GetBoolean(prefs::kEulaAccepted));
NotifyObserver();
}
@@ -50,7 +45,7 @@ EulaAcceptedNotifier* EulaAcceptedNotifier::Create() {
// 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);
}
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
index 62a6237..87f0650 100644
--- a/chrome/common/pref_names.cc
+++ b/chrome/common/pref_names.cc
@@ -1237,6 +1237,9 @@ const char kCipherSuiteBlacklist[] = "ssl.cipher_suites.blacklist";
const char kEnableOriginBoundCerts[] = "ssl.origin_bound_certs.enabled";
const char kDisableSSLRecordSplitting[] = "ssl.ssl_record_splitting.disabled";
+// A boolean pref of the EULA accepted flag.
+const char kEulaAccepted[] = "EulaAccepted";
+
// The metrics client GUID, entropy source and session ID.
const char kMetricsClientID[] = "user_experience_metrics.client_id";
const char kMetricsSessionID[] = "user_experience_metrics.session_id";
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
index b534453..8e520ab 100644
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -435,6 +435,8 @@ extern const char kGLVendorString[];
extern const char kGLRendererString[];
extern const char kGLVersionString[];
+extern const char kEulaAccepted[];
+
extern const char kMetricsClientID[];
extern const char kMetricsSessionID[];
extern const char kMetricsLowEntropySource[];