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

Side by Side Diff: extensions/common/feature_switch.cc

Issue 217813002: Remove the kEasyOffStoreInstall switch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Latest master Created 6 years, 8 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
« no previous file with comments | « no previous file | extensions/common/switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "extensions/common/feature_switch.h" 5 #include "extensions/common/feature_switch.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
11 #include "extensions/common/switches.h" 11 #include "extensions/common/switches.h"
12 12
13 namespace extensions { 13 namespace extensions {
14 14
15 namespace { 15 namespace {
16 16
17 class CommonSwitches { 17 class CommonSwitches {
18 public: 18 public:
19 CommonSwitches() 19 CommonSwitches()
20 : easy_off_store_install( 20 : easy_off_store_install(
21 switches::kEasyOffStoreExtensionInstall, 21 NULL,
22 FeatureSwitch::DEFAULT_DISABLED), 22 FeatureSwitch::DEFAULT_DISABLED),
23 force_dev_mode_highlighting( 23 force_dev_mode_highlighting(
24 switches::kForceDevModeHighlighting, 24 switches::kForceDevModeHighlighting,
25 FeatureSwitch::DEFAULT_DISABLED), 25 FeatureSwitch::DEFAULT_DISABLED),
26 global_commands( 26 global_commands(
27 switches::kGlobalCommands, 27 switches::kGlobalCommands,
28 #if defined(OS_CHROMEOS) 28 #if defined(OS_CHROMEOS)
29 FeatureSwitch::DEFAULT_DISABLED), 29 FeatureSwitch::DEFAULT_DISABLED),
30 #else 30 #else
31 FeatureSwitch::DEFAULT_ENABLED), 31 FeatureSwitch::DEFAULT_ENABLED),
32 #endif 32 #endif
33 prompt_for_external_extensions( 33 prompt_for_external_extensions(
34 NULL, 34 NULL,
35 #if defined(OS_WIN) 35 #if defined(OS_WIN)
36 FeatureSwitch::DEFAULT_ENABLED), 36 FeatureSwitch::DEFAULT_ENABLED),
37 #else 37 #else
38 FeatureSwitch::DEFAULT_DISABLED), 38 FeatureSwitch::DEFAULT_DISABLED),
39 #endif 39 #endif
40 error_console( 40 error_console(
41 switches::kErrorConsole, 41 switches::kErrorConsole,
42 FeatureSwitch::DEFAULT_DISABLED), 42 FeatureSwitch::DEFAULT_DISABLED),
43 enable_override_bookmarks_ui( 43 enable_override_bookmarks_ui(
44 switches::kEnableOverrideBookmarksUI, 44 switches::kEnableOverrideBookmarksUI,
45 FeatureSwitch::DEFAULT_DISABLED) {} 45 FeatureSwitch::DEFAULT_DISABLED) {}
46 46
47 // Enables extensions to be easily installed from sites other than the web
48 // store.
47 FeatureSwitch easy_off_store_install; 49 FeatureSwitch easy_off_store_install;
50
48 FeatureSwitch force_dev_mode_highlighting; 51 FeatureSwitch force_dev_mode_highlighting;
49 FeatureSwitch global_commands; 52 FeatureSwitch global_commands;
53
54 // Should we prompt the user before allowing external extensions to install?
55 // Default is yes.
50 FeatureSwitch prompt_for_external_extensions; 56 FeatureSwitch prompt_for_external_extensions;
57
51 FeatureSwitch error_console; 58 FeatureSwitch error_console;
52 FeatureSwitch enable_override_bookmarks_ui; 59 FeatureSwitch enable_override_bookmarks_ui;
53 }; 60 };
54 61
55 base::LazyInstance<CommonSwitches> g_common_switches = 62 base::LazyInstance<CommonSwitches> g_common_switches =
56 LAZY_INSTANCE_INITIALIZER; 63 LAZY_INSTANCE_INITIALIZER;
57 64
58 } // namespace 65 } // namespace
59 66
60 FeatureSwitch* FeatureSwitch::force_dev_mode_highlighting() { 67 FeatureSwitch* FeatureSwitch::force_dev_mode_highlighting() {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 153
147 void FeatureSwitch::SetOverrideValue(OverrideValue override_value) { 154 void FeatureSwitch::SetOverrideValue(OverrideValue override_value) {
148 override_value_ = override_value; 155 override_value_ = override_value;
149 } 156 }
150 157
151 FeatureSwitch::OverrideValue FeatureSwitch::GetOverrideValue() const { 158 FeatureSwitch::OverrideValue FeatureSwitch::GetOverrideValue() const {
152 return override_value_; 159 return override_value_;
153 } 160 }
154 161
155 } // namespace extensions 162 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | extensions/common/switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698