| Index: chrome/common/extensions/extension.cc
|
| ===================================================================
|
| --- chrome/common/extensions/extension.cc (revision 48200)
|
| +++ chrome/common/extensions/extension.cc (working copy)
|
| @@ -723,8 +723,7 @@
|
| being_upgraded_(false) {
|
| DCHECK(path.IsAbsolute());
|
|
|
| - apps_enabled_ = CommandLine::ForCurrentProcess()->HasSwitch(
|
| - switches::kEnableApps);
|
| + apps_enabled_ = AppsAreEnabled();
|
| location_ = INVALID;
|
|
|
| #if defined(OS_WIN)
|
| @@ -929,6 +928,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)) {
|
|
|