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

Unified Diff: chrome/browser/metrics/variations/eula_accepted_notifier_mobile.cc

Issue 14066011: Move kEulaAccepted pref name to chrome/common/pref_names.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/login/wizard_controller.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « chrome/browser/chromeos/login/wizard_controller.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698