| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chrome/browser/ui/extensions/extension_message_bubble_factory.h" | 5 #include "chrome/browser/ui/extensions/extension_message_bubble_factory.h" |
| 6 | 6 |
| 7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "chrome/common/channel_info.h" | 22 #include "chrome/common/channel_info.h" |
| 23 #include "chrome/common/chrome_switches.h" | 23 #include "chrome/common/chrome_switches.h" |
| 24 #include "components/version_info/version_info.h" | 24 #include "components/version_info/version_info.h" |
| 25 #include "extensions/common/feature_switch.h" | 25 #include "extensions/common/feature_switch.h" |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 // A map of all profiles evaluated, so we can tell if it's the initial check. | 29 // A map of all profiles evaluated, so we can tell if it's the initial check. |
| 30 // TODO(devlin): It would be nice to coalesce all the "profiles evaluated" maps | 30 // TODO(devlin): It would be nice to coalesce all the "profiles evaluated" maps |
| 31 // that are in the different bubble controllers. | 31 // that are in the different bubble controllers. |
| 32 base::LazyInstance<std::set<Profile*> > g_profiles_evaluated = | 32 base::LazyInstance<std::set<Profile*>>::DestructorAtExit g_profiles_evaluated = |
| 33 LAZY_INSTANCE_INITIALIZER; | 33 LAZY_INSTANCE_INITIALIZER; |
| 34 | 34 |
| 35 // This is used to turn on override whether bubbles are enabled or disabled for | 35 // This is used to turn on override whether bubbles are enabled or disabled for |
| 36 // testing. | 36 // testing. |
| 37 ExtensionMessageBubbleFactory::OverrideForTesting g_override_for_testing = | 37 ExtensionMessageBubbleFactory::OverrideForTesting g_override_for_testing = |
| 38 ExtensionMessageBubbleFactory::NO_OVERRIDE; | 38 ExtensionMessageBubbleFactory::NO_OVERRIDE; |
| 39 | 39 |
| 40 const char kEnableDevModeWarningExperimentName[] = | 40 const char kEnableDevModeWarningExperimentName[] = |
| 41 "ExtensionDeveloperModeWarning"; | 41 "ExtensionDeveloperModeWarning"; |
| 42 | 42 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 178 |
| 179 controller.reset(); | 179 controller.reset(); |
| 180 return controller; | 180 return controller; |
| 181 } | 181 } |
| 182 | 182 |
| 183 // static | 183 // static |
| 184 void ExtensionMessageBubbleFactory::set_override_for_tests( | 184 void ExtensionMessageBubbleFactory::set_override_for_tests( |
| 185 OverrideForTesting override) { | 185 OverrideForTesting override) { |
| 186 g_override_for_testing = override; | 186 g_override_for_testing = override; |
| 187 } | 187 } |
| OLD | NEW |