Chromium Code Reviews| Index: chrome/common/extensions/extension.cc |
| diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc |
| index a6d2159d418855e923f02a14073f254d616bc5ab..6fbfe6a1751890672a8ddcc73765f09d24bd25bb 100644 |
| --- a/chrome/common/extensions/extension.cc |
| +++ b/chrome/common/extensions/extension.cc |
| @@ -23,7 +23,6 @@ |
| #include "base/utf_string_conversions.h" |
| #include "base/values.h" |
| #include "base/version.h" |
| -#include "crypto/sha2.h" |
| #include "chrome/common/chrome_constants.h" |
| #include "chrome/common/chrome_switches.h" |
| #include "chrome/common/chrome_version_info.h" |
| @@ -38,6 +37,7 @@ |
| #include "chrome/common/extensions/simple_feature_provider.h" |
| #include "chrome/common/extensions/user_script.h" |
| #include "chrome/common/url_constants.h" |
| +#include "crypto/sha2.h" |
| #include "googleurl/src/url_util.h" |
| #include "grit/chromium_strings.h" |
| #include "grit/generated_resources.h" |
| @@ -1317,6 +1317,11 @@ bool Extension::LoadLaunchContainer(string16* error) { |
| } |
| if (is_platform_app()) { |
| + if (!CommandLine::ForCurrentProcess()->HasSwitch( |
|
Aaron Boodman
2012/03/22 19:16:30
Can we instead put this check in Manifest::GetType
|
| + switches::kEnablePlatformApps)) { |
| + *error = ASCIIToUTF16(errors::kPlatformAppFlagRequired); |
| + return false; |
| + } |
| if (launch_container_ != extension_misc::LAUNCH_SHELL) { |
| *error = ASCIIToUTF16(errors::kInvalidLaunchContainerForPlatform); |
| return false; |