OLD | NEW |
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 FeatureSwitch error_console; | 66 FeatureSwitch error_console; |
67 FeatureSwitch enable_override_bookmarks_ui; | 67 FeatureSwitch enable_override_bookmarks_ui; |
68 FeatureSwitch extension_action_redesign; | 68 FeatureSwitch extension_action_redesign; |
69 FeatureSwitch scripts_require_action; | 69 FeatureSwitch scripts_require_action; |
70 FeatureSwitch embedded_extension_options; | 70 FeatureSwitch embedded_extension_options; |
71 FeatureSwitch trace_app_source; | 71 FeatureSwitch trace_app_source; |
72 FeatureSwitch load_media_router_component_extension; | 72 FeatureSwitch load_media_router_component_extension; |
73 FeatureSwitch native_crx_bindings; | 73 FeatureSwitch native_crx_bindings; |
74 }; | 74 }; |
75 | 75 |
76 base::LazyInstance<CommonSwitches> g_common_switches = | 76 base::LazyInstance<CommonSwitches>::DestructorAtExit g_common_switches = |
77 LAZY_INSTANCE_INITIALIZER; | 77 LAZY_INSTANCE_INITIALIZER; |
78 | 78 |
79 } // namespace | 79 } // namespace |
80 | 80 |
81 FeatureSwitch* FeatureSwitch::force_dev_mode_highlighting() { | 81 FeatureSwitch* FeatureSwitch::force_dev_mode_highlighting() { |
82 return &g_common_switches.Get().force_dev_mode_highlighting; | 82 return &g_common_switches.Get().force_dev_mode_highlighting; |
83 } | 83 } |
84 FeatureSwitch* FeatureSwitch::prompt_for_external_extensions() { | 84 FeatureSwitch* FeatureSwitch::prompt_for_external_extensions() { |
85 return &g_common_switches.Get().prompt_for_external_extensions; | 85 return &g_common_switches.Get().prompt_for_external_extensions; |
86 } | 86 } |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 | 200 |
201 void FeatureSwitch::SetOverrideValue(OverrideValue override_value) { | 201 void FeatureSwitch::SetOverrideValue(OverrideValue override_value) { |
202 override_value_ = override_value; | 202 override_value_ = override_value; |
203 } | 203 } |
204 | 204 |
205 FeatureSwitch::OverrideValue FeatureSwitch::GetOverrideValue() const { | 205 FeatureSwitch::OverrideValue FeatureSwitch::GetOverrideValue() const { |
206 return override_value_; | 206 return override_value_; |
207 } | 207 } |
208 | 208 |
209 } // namespace extensions | 209 } // namespace extensions |
OLD | NEW |