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

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

Issue 598173003: Run clang-modernize -use-nullptr over src/extensions/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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"
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(nullptr, FeatureSwitch::DEFAULT_DISABLED),
21 NULL, 21 force_dev_mode_highlighting(switches::kForceDevModeHighlighting,
22 FeatureSwitch::DEFAULT_DISABLED), 22 FeatureSwitch::DEFAULT_DISABLED),
23 force_dev_mode_highlighting( 23 prompt_for_external_extensions(nullptr,
24 switches::kForceDevModeHighlighting,
25 FeatureSwitch::DEFAULT_DISABLED),
26 prompt_for_external_extensions(
27 NULL,
28 #if defined(OS_WIN) 24 #if defined(OS_WIN)
29 FeatureSwitch::DEFAULT_ENABLED), 25 FeatureSwitch::DEFAULT_ENABLED),
30 #else 26 #else
31 FeatureSwitch::DEFAULT_DISABLED), 27 FeatureSwitch::DEFAULT_DISABLED),
32 #endif 28 #endif
33 error_console( 29 error_console(switches::kErrorConsole, FeatureSwitch::DEFAULT_DISABLED),
34 switches::kErrorConsole, 30 enable_override_bookmarks_ui(switches::kEnableOverrideBookmarksUI,
35 FeatureSwitch::DEFAULT_DISABLED), 31 FeatureSwitch::DEFAULT_DISABLED),
36 enable_override_bookmarks_ui( 32 extension_action_redesign(switches::kExtensionActionRedesign,
37 switches::kEnableOverrideBookmarksUI, 33 FeatureSwitch::DEFAULT_DISABLED),
38 FeatureSwitch::DEFAULT_DISABLED),
39 extension_action_redesign(
40 switches::kExtensionActionRedesign,
41 FeatureSwitch::DEFAULT_DISABLED),
42 scripts_require_action(switches::kScriptsRequireAction, 34 scripts_require_action(switches::kScriptsRequireAction,
43 FeatureSwitch::DEFAULT_DISABLED), 35 FeatureSwitch::DEFAULT_DISABLED),
44 embedded_extension_options( 36 embedded_extension_options(switches::kEmbeddedExtensionOptions,
45 switches::kEmbeddedExtensionOptions, 37 FeatureSwitch::DEFAULT_DISABLED),
46 FeatureSwitch::DEFAULT_DISABLED), 38 app_view(switches::kAppView, FeatureSwitch::DEFAULT_DISABLED),
47 app_view(switches::kAppView,
48 FeatureSwitch::DEFAULT_DISABLED),
49 mime_handler_view(switches::kMimeHandlerView, 39 mime_handler_view(switches::kMimeHandlerView,
50 FeatureSwitch::DEFAULT_DISABLED) {} 40 FeatureSwitch::DEFAULT_DISABLED) {}
51 41
52 // Enables extensions to be easily installed from sites other than the web 42 // Enables extensions to be easily installed from sites other than the web
53 // store. 43 // store.
54 FeatureSwitch easy_off_store_install; 44 FeatureSwitch easy_off_store_install;
55 45
56 FeatureSwitch force_dev_mode_highlighting; 46 FeatureSwitch force_dev_mode_highlighting;
57 47
58 // Should we prompt the user before allowing external extensions to install? 48 // Should we prompt the user before allowing external extensions to install?
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 164
175 void FeatureSwitch::SetOverrideValue(OverrideValue override_value) { 165 void FeatureSwitch::SetOverrideValue(OverrideValue override_value) {
176 override_value_ = override_value; 166 override_value_ = override_value;
177 } 167 }
178 168
179 FeatureSwitch::OverrideValue FeatureSwitch::GetOverrideValue() const { 169 FeatureSwitch::OverrideValue FeatureSwitch::GetOverrideValue() const {
180 return override_value_; 170 return override_value_;
181 } 171 }
182 172
183 } // namespace extensions 173 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698