| 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/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 "chrome/browser/extensions/dev_mode_bubble_controller.h" | 10 #include "chrome/browser/extensions/dev_mode_bubble_controller.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 return g_enabled_for_tests || | 68 return g_enabled_for_tests || |
| 69 IsExperimentEnabled(kEnableProxyWarningExperimentName); | 69 IsExperimentEnabled(kEnableProxyWarningExperimentName); |
| 70 #endif | 70 #endif |
| 71 } | 71 } |
| 72 | 72 |
| 73 bool EnableDevModeBubble() { | 73 bool EnableDevModeBubble() { |
| 74 if (extensions::FeatureSwitch::force_dev_mode_highlighting()->IsEnabled()) | 74 if (extensions::FeatureSwitch::force_dev_mode_highlighting()->IsEnabled()) |
| 75 return true; | 75 return true; |
| 76 | 76 |
| 77 #if defined(OS_WIN) | 77 #if defined(OS_WIN) |
| 78 if (chrome::VersionInfo::GetChannel() >= chrome::VersionInfo::CHANNEL_BETA) | 78 if (chrome::VersionInfo::GetChannel() >= version_info::Channel::BETA) |
| 79 return true; | 79 return true; |
| 80 #endif | 80 #endif |
| 81 | 81 |
| 82 return g_enabled_for_tests || | 82 return g_enabled_for_tests || |
| 83 IsExperimentEnabled(kEnableDevModeWarningExperimentName); | 83 IsExperimentEnabled(kEnableDevModeWarningExperimentName); |
| 84 } | 84 } |
| 85 | 85 |
| 86 } // namespace | 86 } // namespace |
| 87 | 87 |
| 88 ExtensionMessageBubbleFactory::ExtensionMessageBubbleFactory(Profile* profile) | 88 ExtensionMessageBubbleFactory::ExtensionMessageBubbleFactory(Profile* profile) |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 return controller.Pass(); | 145 return controller.Pass(); |
| 146 } | 146 } |
| 147 | 147 |
| 148 return scoped_ptr<extensions::ExtensionMessageBubbleController>(); | 148 return scoped_ptr<extensions::ExtensionMessageBubbleController>(); |
| 149 } | 149 } |
| 150 | 150 |
| 151 // static | 151 // static |
| 152 void ExtensionMessageBubbleFactory::set_enabled_for_tests(bool enabled) { | 152 void ExtensionMessageBubbleFactory::set_enabled_for_tests(bool enabled) { |
| 153 g_enabled_for_tests = enabled; | 153 g_enabled_for_tests = enabled; |
| 154 } | 154 } |
| OLD | NEW |