| Index: chrome/common/extensions/extension.cc
|
| diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
|
| index dbe72d1f7c0b95cefb24de479e5c5e998ffb1c6f..70bb789e2729d13f4e2ff85aed430936ea5b77e1 100644
|
| --- a/chrome/common/extensions/extension.cc
|
| +++ b/chrome/common/extensions/extension.cc
|
| @@ -903,6 +903,12 @@ bool Extension::LoadIsApp(const DictionaryValue* manifest,
|
| if (manifest->HasKey(keys::kApp))
|
| is_app_ = true;
|
|
|
| + if (CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kEnablePlatformApps)) {
|
| + if (manifest->HasKey(keys::kPlatformApp))
|
| + is_platform_app_ = true;
|
| + }
|
| +
|
| return true;
|
| }
|
|
|
| @@ -1275,6 +1281,7 @@ Extension::Extension(const FilePath& path, Location location)
|
| converted_from_user_script_(false),
|
| is_theme_(false),
|
| is_app_(false),
|
| + is_platform_app_(false),
|
| is_storage_isolated_(false),
|
| launch_container_(extension_misc::LAUNCH_TAB),
|
| launch_width_(0),
|
| @@ -1515,6 +1522,13 @@ bool Extension::InitFromValue(const DictionaryValue& source, int flags,
|
| return false;
|
| }
|
|
|
| + if (is_platform_app_) {
|
| + if (launch_container() != extension_misc::LAUNCH_PANEL) {
|
| + *error = errors::kInvalidLaunchContainerForPlatform;
|
| + return false;
|
| + }
|
| + }
|
| +
|
| // Initialize the permissions (optional).
|
| ExtensionAPIPermissionSet api_permissions;
|
| URLPatternSet host_permissions;
|
|
|