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/suspicious_extension_bubble_controller.h" | 5 #include "chrome/browser/extensions/suspicious_extension_bubble_controller.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
11 #include "chrome/browser/extensions/extension_message_bubble.h" | 11 #include "chrome/browser/extensions/extension_message_bubble.h" |
12 #include "chrome/browser/extensions/extension_prefs.h" | |
13 #include "chrome/browser/extensions/extension_service.h" | 12 #include "chrome/browser/extensions/extension_service.h" |
14 #include "chrome/browser/ui/browser.h" | 13 #include "chrome/browser/ui/browser.h" |
15 #include "chrome/browser/ui/browser_finder.h" | 14 #include "chrome/browser/ui/browser_finder.h" |
16 #include "chrome/common/url_constants.h" | 15 #include "chrome/common/url_constants.h" |
17 #include "content/public/browser/user_metrics.h" | 16 #include "content/public/browser/user_metrics.h" |
| 17 #include "extensions/browser/extension_prefs.h" |
18 #include "grit/chromium_strings.h" | 18 #include "grit/chromium_strings.h" |
19 #include "grit/generated_resources.h" | 19 #include "grit/generated_resources.h" |
20 #include "ui/base/l10n/l10n_util.h" | 20 #include "ui/base/l10n/l10n_util.h" |
21 | 21 |
22 namespace { | 22 namespace { |
23 | 23 |
24 base::LazyInstance<std::set<Profile*> > g_shown_for_profiles = | 24 base::LazyInstance<std::set<Profile*> > g_shown_for_profiles = |
25 LAZY_INSTANCE_INITIALIZER; | 25 LAZY_INSTANCE_INITIALIZER; |
26 | 26 |
27 //////////////////////////////////////////////////////////////////////////////// | 27 //////////////////////////////////////////////////////////////////////////////// |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 return !g_shown_for_profiles.Get().count(profile_) && | 156 return !g_shown_for_profiles.Get().count(profile_) && |
157 !GetExtensionList().empty(); | 157 !GetExtensionList().empty(); |
158 } | 158 } |
159 | 159 |
160 void SuspiciousExtensionBubbleController::Show(ExtensionMessageBubble* bubble) { | 160 void SuspiciousExtensionBubbleController::Show(ExtensionMessageBubble* bubble) { |
161 g_shown_for_profiles.Get().insert(profile_); | 161 g_shown_for_profiles.Get().insert(profile_); |
162 ExtensionMessageBubbleController::Show(bubble); | 162 ExtensionMessageBubbleController::Show(bubble); |
163 } | 163 } |
164 | 164 |
165 } // namespace extensions | 165 } // namespace extensions |
OLD | NEW |