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

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

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again Created 3 years, 9 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « extensions/browser/guest_view/web_view/web_view_guest.cc ('k') | extensions/common/manifest_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698