Index: chrome/common/extensions/extension.cc |
=================================================================== |
--- chrome/common/extensions/extension.cc (revision 48045) |
+++ chrome/common/extensions/extension.cc (working copy) |
@@ -724,8 +724,7 @@ |
being_upgraded_(false) { |
DCHECK(path.IsAbsolute()); |
- apps_enabled_ = CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kEnableApps); |
+ apps_enabled_ = AppsAreEnabled(); |
location_ = INVALID; |
#if defined(OS_WIN) |
@@ -930,6 +929,17 @@ |
chrome::kStandardSchemeSeparator + extension_id + "/"); |
} |
+// static |
+bool Extension::AppsAreEnabled() { |
+#if defined(OS_CHROMEOS) |
+ return true; |
+#else |
+ static bool apps_enabled_mode = |
+ CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableApps); |
+ return apps_enabled_mode; |
+#endif |
+} |
+ |
bool Extension::InitFromValue(const DictionaryValue& source, bool require_key, |
std::string* error) { |
if (source.HasKey(keys::kPublicKey)) { |