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

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

Issue 571213003: Revert "Embedded Extension Options: remove flags and trunk channel restrictions" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
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"
(...skipping 23 matching lines...) Expand all
34 switches::kErrorConsole, 34 switches::kErrorConsole,
35 FeatureSwitch::DEFAULT_DISABLED), 35 FeatureSwitch::DEFAULT_DISABLED),
36 enable_override_bookmarks_ui( 36 enable_override_bookmarks_ui(
37 switches::kEnableOverrideBookmarksUI, 37 switches::kEnableOverrideBookmarksUI,
38 FeatureSwitch::DEFAULT_DISABLED), 38 FeatureSwitch::DEFAULT_DISABLED),
39 extension_action_redesign( 39 extension_action_redesign(
40 switches::kExtensionActionRedesign, 40 switches::kExtensionActionRedesign,
41 FeatureSwitch::DEFAULT_DISABLED), 41 FeatureSwitch::DEFAULT_DISABLED),
42 scripts_require_action(switches::kScriptsRequireAction, 42 scripts_require_action(switches::kScriptsRequireAction,
43 FeatureSwitch::DEFAULT_DISABLED), 43 FeatureSwitch::DEFAULT_DISABLED),
44 embedded_extension_options(
45 switches::kEmbeddedExtensionOptions,
46 FeatureSwitch::DEFAULT_DISABLED),
44 app_view(switches::kAppView, 47 app_view(switches::kAppView,
45 FeatureSwitch::DEFAULT_DISABLED), 48 FeatureSwitch::DEFAULT_DISABLED),
46 mime_handler_view(switches::kMimeHandlerView, 49 mime_handler_view(switches::kMimeHandlerView,
47 FeatureSwitch::DEFAULT_DISABLED) {} 50 FeatureSwitch::DEFAULT_DISABLED) {}
48 51
49 // Enables extensions to be easily installed from sites other than the web 52 // Enables extensions to be easily installed from sites other than the web
50 // store. 53 // store.
51 FeatureSwitch easy_off_store_install; 54 FeatureSwitch easy_off_store_install;
52 55
53 FeatureSwitch force_dev_mode_highlighting; 56 FeatureSwitch force_dev_mode_highlighting;
54 57
55 // Should we prompt the user before allowing external extensions to install? 58 // Should we prompt the user before allowing external extensions to install?
56 // Default is yes. 59 // Default is yes.
57 FeatureSwitch prompt_for_external_extensions; 60 FeatureSwitch prompt_for_external_extensions;
58 61
59 FeatureSwitch error_console; 62 FeatureSwitch error_console;
60 FeatureSwitch enable_override_bookmarks_ui; 63 FeatureSwitch enable_override_bookmarks_ui;
61 FeatureSwitch extension_action_redesign; 64 FeatureSwitch extension_action_redesign;
62 FeatureSwitch scripts_require_action; 65 FeatureSwitch scripts_require_action;
66 FeatureSwitch embedded_extension_options;
63 FeatureSwitch app_view; 67 FeatureSwitch app_view;
64 FeatureSwitch mime_handler_view; 68 FeatureSwitch mime_handler_view;
65 }; 69 };
66 70
67 base::LazyInstance<CommonSwitches> g_common_switches = 71 base::LazyInstance<CommonSwitches> g_common_switches =
68 LAZY_INSTANCE_INITIALIZER; 72 LAZY_INSTANCE_INITIALIZER;
69 73
70 } // namespace 74 } // namespace
71 75
72 FeatureSwitch* FeatureSwitch::force_dev_mode_highlighting() { 76 FeatureSwitch* FeatureSwitch::force_dev_mode_highlighting() {
(...skipping 10 matching lines...) Expand all
83 } 87 }
84 FeatureSwitch* FeatureSwitch::enable_override_bookmarks_ui() { 88 FeatureSwitch* FeatureSwitch::enable_override_bookmarks_ui() {
85 return &g_common_switches.Get().enable_override_bookmarks_ui; 89 return &g_common_switches.Get().enable_override_bookmarks_ui;
86 } 90 }
87 FeatureSwitch* FeatureSwitch::extension_action_redesign() { 91 FeatureSwitch* FeatureSwitch::extension_action_redesign() {
88 return &g_common_switches.Get().extension_action_redesign; 92 return &g_common_switches.Get().extension_action_redesign;
89 } 93 }
90 FeatureSwitch* FeatureSwitch::scripts_require_action() { 94 FeatureSwitch* FeatureSwitch::scripts_require_action() {
91 return &g_common_switches.Get().scripts_require_action; 95 return &g_common_switches.Get().scripts_require_action;
92 } 96 }
97 FeatureSwitch* FeatureSwitch::embedded_extension_options() {
98 return &g_common_switches.Get().embedded_extension_options;
99 }
93 FeatureSwitch* FeatureSwitch::app_view() { 100 FeatureSwitch* FeatureSwitch::app_view() {
94 return &g_common_switches.Get().app_view; 101 return &g_common_switches.Get().app_view;
95 } 102 }
96 FeatureSwitch* FeatureSwitch::mime_handler_view() { 103 FeatureSwitch* FeatureSwitch::mime_handler_view() {
97 return &g_common_switches.Get().mime_handler_view; 104 return &g_common_switches.Get().mime_handler_view;
98 } 105 }
99 106
100 FeatureSwitch::ScopedOverride::ScopedOverride(FeatureSwitch* feature, 107 FeatureSwitch::ScopedOverride::ScopedOverride(FeatureSwitch* feature,
101 bool override_value) 108 bool override_value)
102 : feature_(feature), 109 : feature_(feature),
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 174
168 void FeatureSwitch::SetOverrideValue(OverrideValue override_value) { 175 void FeatureSwitch::SetOverrideValue(OverrideValue override_value) {
169 override_value_ = override_value; 176 override_value_ = override_value;
170 } 177 }
171 178
172 FeatureSwitch::OverrideValue FeatureSwitch::GetOverrideValue() const { 179 FeatureSwitch::OverrideValue FeatureSwitch::GetOverrideValue() const {
173 return override_value_; 180 return override_value_;
174 } 181 }
175 182
176 } // namespace extensions 183 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/feature_switch.h ('k') | extensions/common/manifest_handlers/options_page_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698