Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5356)

Unified Diff: chrome/common/extensions/extension.cc

Issue 9834022: Expand usage of platform-apps flag and permission features. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch Set 1 Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
« no previous file with comments | « chrome/common/extensions/api/_permission_features.json ('k') | chrome/common/extensions/extension_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698