summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authormpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-15 17:36:57 +0000
committermpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-15 17:36:57 +0000
commit669ee49451515869197bada76f1558e78941689e (patch)
tree200be1e2c7906373017b2e8b38a62f101b5126f1 /chrome/common
parenta866cc21b77be5881eef0039db0b5928587f0b54 (diff)
downloadchromium_src-669ee49451515869197bada76f1558e78941689e.zip
chromium_src-669ee49451515869197bada76f1558e78941689e.tar.gz
chromium_src-669ee49451515869197bada76f1558e78941689e.tar.bz2
Reenable InstallApps attempt #2. This time with a fix to
ManifestTest.AppsDisabledByDefault. Don't cache the value of the CommandLine, since unit_tests can modify it while the process is running. BUG=41280 Review URL: http://codereview.chromium.org/2824005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49809 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/extensions/extension.cc4
-rw-r--r--chrome/common/extensions/extension_manifests_unittest.cc3
2 files changed, 2 insertions, 5 deletions
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index 8736c79..4a6bac3 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -934,9 +934,7 @@ bool Extension::AppsAreEnabled() {
#if defined(OS_CHROMEOS)
return true;
#else
- static bool apps_enabled_mode =
- CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableApps);
- return apps_enabled_mode;
+ return CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableApps);
#endif
}
diff --git a/chrome/common/extensions/extension_manifests_unittest.cc b/chrome/common/extensions/extension_manifests_unittest.cc
index a92bdf5..f1e59c3 100644
--- a/chrome/common/extensions/extension_manifests_unittest.cc
+++ b/chrome/common/extensions/extension_manifests_unittest.cc
@@ -44,8 +44,7 @@ class ManifestTest : public testing::Test {
scoped_ptr<Extension> extension(new Extension(path.DirName()));
extension->set_location(location);
- if (enable_apps_)
- extension->set_apps_enabled(true);
+ extension->set_apps_enabled(enable_apps_);
if (!extension->InitFromValue(*value, false, error))
return NULL;