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

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

Issue 3522015: Implement new strategy for default apps (Closed)
Patch Set: all done Created 10 years, 2 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
« no previous file with comments | « chrome/common/extensions/extension.h ('k') | chrome/common/extensions/extension_manifests_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension.cc
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index bdf130e46db291de9dbddbc8d12ec060794c25bd..f6c7b1ba841475136cbc056bfbafc9d19e42a36e 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -733,14 +733,8 @@ bool Extension::ContainsNonThemeKeys(const DictionaryValue& source) {
bool Extension::LoadIsApp(const DictionaryValue* manifest,
std::string* error) {
- if (manifest->HasKey(keys::kApp)) {
- if (!apps_enabled_) {
- *error = errors::kAppsNotEnabled;
- return false;
- } else {
- is_app_ = true;
- }
- }
+ if (manifest->HasKey(keys::kApp))
+ is_app_ = true;
return true;
}
@@ -959,7 +953,6 @@ Extension::Extension(const FilePath& path)
DCHECK(path.IsAbsolute());
static_data_ = mutable_static_data_;
- apps_enabled_ = AppsAreEnabled();
location_ = INVALID;
#if defined(OS_WIN)
@@ -1165,11 +1158,6 @@ GURL Extension::GetBaseURLFromExtensionId(const std::string& extension_id) {
chrome::kStandardSchemeSeparator + extension_id + "/");
}
-// static
-bool Extension::AppsAreEnabled() {
- return !CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableApps);
-}
-
bool Extension::InitFromValue(const DictionaryValue& source, bool require_key,
std::string* error) {
// Unit tests reuse Extension objects, so we need to reset mutable_static_data
« no previous file with comments | « chrome/common/extensions/extension.h ('k') | chrome/common/extensions/extension_manifests_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698