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..79564fa1678512b2a50dd6a0332a7c73b2f8873f 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,21 @@ bool GetOobeTimestampFunction::GetOobeTimestampOnFileThread() { |
SetResult(new base::StringValue(timestamp)); |
return true; |
} |
+ |
+IsEchoDisabledFunction::IsEchoDisabledFunction() { |
+} |
+ |
+IsEchoDisabledFunction::~IsEchoDisabledFunction() { |
+} |
+ |
+// Check the enterprise policy kChromeOsRegistrationEnabled flag value. |
+// This policy is used to enable/disable Echo for enterprise device. |
+bool IsEchoDisabledFunction::RunImpl() { |
+ bool isEnabled = true; |
+ // If the policy is not provided, isEnabled will not be modified by |
+ // GetBoolean. |
oscarpan
2013/02/02 01:50:56
I assume this comment is correct and seems so from
xiyuan
2013/02/02 07:49:27
I think the comment is correct. If not confortable
Mattias Nissler (ping if slow)
2013/02/04 09:06:19
It should be you convincing the reviewers ;) In th
|
+ chromeos::CrosSettings::Get()->GetBoolean( |
+ chromeos::kChromeOsRegistrationEnabled, &isEnabled); |
xiyuan
2013/02/02 07:49:27
nit: 4-space indent
xiyuan
2013/02/02 07:49:27
Do we need to worry that this value might not be t
oscarpan
2013/02/02 21:52:35
I'm not sure when this value is unreliable. Is the
xiyuan
2013/02/02 22:44:16
I am not worrying about extension code being chang
oscarpan
2013/02/05 00:17:47
Done.
oscarpan
2013/02/05 00:17:47
How about we postpone this feature to later cls.
|
+ SetResult(new base::FundamentalValue(!isEnabled)); |
+ return true; |
+} |