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

Unified Diff: chrome/browser/chromeos/extensions/echo_private_api.cc

Issue 17010003: Cleanup of system settings constants (ab)use. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
Index: chrome/browser/chromeos/extensions/echo_private_api.cc
diff --git a/chrome/browser/chromeos/extensions/echo_private_api.cc b/chrome/browser/chromeos/extensions/echo_private_api.cc
index 5580cc226ce6b42bd7d0567ec8915b2876e760cc..1b331bd5132c7c5560a3b7ac4c308430200967e6 100644
--- a/chrome/browser/chromeos/extensions/echo_private_api.cc
+++ b/chrome/browser/chromeos/extensions/echo_private_api.cc
@@ -51,9 +51,7 @@ void EchoPrivateGetRegistrationCodeFunction::GetRegistrationCode(
}
// Possible ECHO code type and corresponding key name in StatisticsProvider.
const std::string kCouponType = "COUPON_CODE";
- const std::string kCouponCodeKey = "ubind_attribute";
const std::string kGroupType = "GROUP_CODE";
- const std::string kGroupCodeKey = "gbind_attribute";
chromeos::system::StatisticsProvider* provider =
chromeos::system::StatisticsProvider::GetInstance();
@@ -61,10 +59,13 @@ void EchoPrivateGetRegistrationCodeFunction::GetRegistrationCode(
if (!chromeos::KioskModeSettings::Get()->IsKioskModeEnabled()) {
// In Kiosk mode, we effectively disable the registration API
// by always returning an empty code.
- if (type == kCouponType)
- provider->GetMachineStatistic(kCouponCodeKey, &result);
- else if (type == kGroupType)
- provider->GetMachineStatistic(kGroupCodeKey, &result);
+ if (type == kCouponType) {
+ provider->GetMachineStatistic(chromeos::system::kOffersCouponCodeKey,
+ &result);
+ } else if (type == kGroupType) {
+ provider->GetMachineStatistic(chromeos::system::kOffersGroupCodeKey,
+ &result);
+ }
}
results_ = echo_api::GetRegistrationCode::Results::Create(result);

Powered by Google App Engine
This is Rietveld 408576698