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

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

Issue 16398010: Move some extension manifest consistency checks to BackgroundManifestHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 ac5229130700790a147614eb3298948635683016..0b1162347b139f2852e5e90fec7707290633350b 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -23,19 +23,13 @@
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_version_info.h"
-// TODO(rdevlin.cronin): Remove these once all references have been removed as
-// part of crbug.com/159265.
-#include "chrome/common/extensions/background_info.h"
#include "chrome/common/extensions/extension_manifest_constants.h"
-#include "chrome/common/extensions/incognito_handler.h"
#include "chrome/common/extensions/manifest.h"
#include "chrome/common/extensions/manifest_handler.h"
-#include "chrome/common/extensions/manifest_url_handler.h"
#include "chrome/common/extensions/permissions/api_permission_set.h"
#include "chrome/common/extensions/permissions/permission_set.h"
#include "chrome/common/extensions/permissions/permissions_data.h"
#include "chrome/common/extensions/permissions/permissions_info.h"
-#include "chrome/common/extensions/user_script.h"
#include "chrome/common/url_constants.h"
#include "extensions/common/constants.h"
#include "extensions/common/error_utils.h"
@@ -174,12 +168,6 @@ scoped_refptr<Extension> Extension::Create(const base::FilePath& path,
return NULL;
}
- if (!extension->CheckPlatformAppFeatures(&error) ||
- !extension->CheckConflictingFeatures(&error)) {
- *utf8_error = UTF16ToUTF8(error);
- return NULL;
- }
-
return extension;
}
@@ -824,33 +812,6 @@ bool Extension::CheckMinimumChromeVersion(string16* error) const {
return true;
}
-bool Extension::CheckPlatformAppFeatures(string16* error) const {
- if (!is_platform_app())
- return true;
-
- if (!BackgroundInfo::HasBackgroundPage(this)) {
- *error = ASCIIToUTF16(errors::kBackgroundRequiredForPlatformApps);
- return false;
- }
-
- if (!IncognitoInfo::IsSplitMode(this)) {
Yoyo Zhou 2013/06/07 02:01:43 This is unnecessary because of manifest_features.
- *error = ASCIIToUTF16(errors::kInvalidIncognitoModeForPlatformApp);
Matt Perry 2013/06/07 20:32:03 Can this error string be removed, then?
Yoyo Zhou 2013/06/07 21:05:16 Sure.
- return false;
- }
-
- return true;
-}
-
-bool Extension::CheckConflictingFeatures(string16* error) const {
- if (BackgroundInfo::HasLazyBackgroundPage(this) &&
- HasAPIPermission(APIPermission::kWebRequest)) {
- *error = ASCIIToUTF16(errors::kWebRequestConflictsWithLazyBackground);
- return false;
- }
-
- return true;
-}
-
ExtensionInfo::ExtensionInfo(const DictionaryValue* manifest,
const std::string& id,
const base::FilePath& path,
« chrome/browser/download/download_crx_util.cc ('K') | « chrome/common/extensions/extension.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698