Chromium Code Reviews| 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 51f195dbf4e0e44638fb24e52fb98891c716a1bf..8c81a6d0e5bea98eb4a89f389a44faddd3d5c0f8 100644 |
| --- a/chrome/browser/chromeos/extensions/echo_private_api.cc |
| +++ b/chrome/browser/chromeos/extensions/echo_private_api.cc |
| @@ -14,6 +14,7 @@ |
| #include "base/time.h" |
| #include "base/values.h" |
| #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" |
| +#include "chrome/browser/chromeos/settings/cros_settings.h" |
| #include "chrome/browser/chromeos/system/statistics_provider.h" |
| #include "chrome/common/extensions/extension.h" |
| #include "content/public/browser/browser_thread.h" |
| @@ -98,3 +99,23 @@ bool GetOobeTimestampFunction::GetOobeTimestampOnFileThread() { |
| SetResult(new base::StringValue(timestamp)); |
| return true; |
| } |
| + |
| +AllowRedeemOffersFunction::AllowRedeemOffersFunction() { |
| +} |
| + |
| +AllowRedeemOffersFunction::~AllowRedeemOffersFunction() { |
| +} |
| + |
| +// Check the enterprise policy kAllowRedeemChromeOsRegistrationOffers flag |
| +// value. This policy is used to controll whether user can redeem offers using |
| +// enterprise device. |
| +bool AllowRedeemOffersFunction::RunImpl() { |
| + bool allow = true; |
| + // If the policy is not provided, "allow" will not be modified by |
| + // GetBoolean. |
| + // TODO(oscarpan): Check if we need to use PreparedTrustedValues. |
|
Mattias Nissler (ping if slow)
2013/02/05 13:06:53
You should be using this. As pointed out by Xiyuan
oscarpan
2013/02/06 04:34:54
Done.
|
| + chromeos::CrosSettings::Get()->GetBoolean( |
| + chromeos::kAllowRedeemChromeOsRegistrationOffers, &allow); |
| + SetResult(new base::FundamentalValue(allow)); |
| + return true; |
| +} |