Index: chrome/common/extensions/extension.cc |
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc |
index ba5753c67923dd1b962baf616f5660b312517018..55f5092cec383ea3a56d91c536680d39202cb8f6 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; |
} |
@@ -1272,6 +1278,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), |
@@ -1512,6 +1519,13 @@ bool Extension::InitFromValue(const DictionaryValue& source, int flags, |
return false; |
} |
+ if (is_platform_app_) { |
+ if (launch_container() != extension_misc::LAUNCH_PANEL) { |
Aaron Boodman
2011/11/05 16:10:21
Nit: why not put this in the LoadLaunchContainer()
miket_OOO
2011/11/07 17:07:46
Doing so would contribute to a problem I see with
|
+ *error = errors::kInvalidLaunchContainerForPlatform; |
+ return false; |
+ } |
+ } |
+ |
// Initialize the permissions (optional). |
ExtensionAPIPermissionSet api_permissions; |
URLPatternSet host_permissions; |