OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "chrome/browser/extensions/dev_mode_bubble_controller.h" | 5 #include "chrome/browser/extensions/dev_mode_bubble_controller.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "chrome/browser/extensions/extension_action_manager.h" | 9 #include "chrome/browser/extensions/extension_action_manager.h" |
10 #include "chrome/browser/extensions/extension_message_bubble.h" | 10 #include "chrome/browser/extensions/extension_message_bubble.h" |
11 #include "chrome/browser/extensions/extension_service.h" | 11 #include "chrome/browser/extensions/extension_service.h" |
12 #include "chrome/browser/extensions/extension_toolbar_model.h" | 12 #include "chrome/browser/extensions/extension_toolbar_model.h" |
13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
14 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
15 #include "chrome/common/chrome_version_info.h" | 15 #include "chrome/common/chrome_version_info.h" |
16 #include "chrome/common/url_constants.h" | 16 #include "chrome/common/url_constants.h" |
17 #include "chrome/grit/generated_resources.h" | 17 #include "chrome/grit/generated_resources.h" |
18 #include "extensions/browser/extension_prefs.h" | 18 #include "extensions/browser/extension_prefs.h" |
19 #include "extensions/browser/extension_system.h" | 19 #include "extensions/browser/extension_system.h" |
20 #include "extensions/common/feature_switch.h" | 20 #include "extensions/common/feature_switch.h" |
| 21 #include "grit/components_strings.h" |
21 #include "ui/base/l10n/l10n_util.h" | 22 #include "ui/base/l10n/l10n_util.h" |
22 | 23 |
23 namespace extensions { | 24 namespace extensions { |
24 | 25 |
25 namespace { | 26 namespace { |
26 | 27 |
27 base::LazyInstance<std::set<Profile*> > g_shown_for_profiles = | 28 base::LazyInstance<std::set<Profile*> > g_shown_for_profiles = |
28 LAZY_INSTANCE_INITIALIZER; | 29 LAZY_INSTANCE_INITIALIZER; |
29 | 30 |
30 //////////////////////////////////////////////////////////////////////////////// | 31 //////////////////////////////////////////////////////////////////////////////// |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 return !g_shown_for_profiles.Get().count(profile_->GetOriginalProfile()) && | 180 return !g_shown_for_profiles.Get().count(profile_->GetOriginalProfile()) && |
180 !GetExtensionList().empty(); | 181 !GetExtensionList().empty(); |
181 } | 182 } |
182 | 183 |
183 void DevModeBubbleController::Show(ExtensionMessageBubble* bubble) { | 184 void DevModeBubbleController::Show(ExtensionMessageBubble* bubble) { |
184 g_shown_for_profiles.Get().insert(profile_->GetOriginalProfile()); | 185 g_shown_for_profiles.Get().insert(profile_->GetOriginalProfile()); |
185 ExtensionMessageBubbleController::Show(bubble); | 186 ExtensionMessageBubbleController::Show(bubble); |
186 } | 187 } |
187 | 188 |
188 } // namespace extensions | 189 } // namespace extensions |
OLD | NEW |