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

Side by Side Diff: chrome/common/extensions/extension_switch_utils.cc

Issue 10452009: Improve the UI for disabling off-store extension install. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/common/extensions/extension_switch_utils.h" 5 #include "chrome/common/extensions/extension_switch_utils.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/common/chrome_switches.h" 8 #include "chrome/common/chrome_switches.h"
9 9
10 namespace extensions { 10 namespace extensions {
11 11
12 namespace switch_utils { 12 namespace switch_utils {
13 13
14 bool IsOffStoreInstallEnabled() { 14 bool IsOffStoreInstallEnabled() {
15 // Disabling off-store installation is not yet implemented for Aura. Not sure 15 // Disabling off-store installation is not yet implemented for Aura. Not sure
16 // what the Aura equivalent for this UI is. 16 // what the Aura equivalent for this UI is.
17 #if defined(USE_AURA) 17 #if defined(USE_AURA)
18 return true; 18 return true;
19 #else 19 #else
20 return CommandLine::ForCurrentProcess()->HasSwitch( 20 // Currently, we default to enabling off-store install.
21 switches::kEnableOffStoreExtensionInstall); 21 std::string switch_value =
22 CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
23 switches::kEnableOffStoreExtensionInstall);
24 return switch_value != "0";
22 #endif 25 #endif
23 } 26 }
24 27
25 bool IsActionBoxEnabled() { 28 bool IsActionBoxEnabled() {
26 return CommandLine::ForCurrentProcess()->HasSwitch( 29 return CommandLine::ForCurrentProcess()->HasSwitch(
27 switches::kEnableActionBox); 30 switches::kEnableActionBox);
28 } 31 }
29 32
30 } // switch_utils 33 } // switch_utils
31 34
32 } // extensions 35 } // extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698