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/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/extensions/extension_message_bubble.h" | 10 #include "chrome/browser/extensions/extension_message_bubble.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 SuspiciousExtensionBubbleController::GetLearnMoreLabel() const { | 115 SuspiciousExtensionBubbleController::GetLearnMoreLabel() const { |
116 return l10n_util::GetStringUTF16(IDS_LEARN_MORE); | 116 return l10n_util::GetStringUTF16(IDS_LEARN_MORE); |
117 } | 117 } |
118 | 118 |
119 GURL SuspiciousExtensionBubbleController::GetLearnMoreUrl() const { | 119 GURL SuspiciousExtensionBubbleController::GetLearnMoreUrl() const { |
120 return GURL(chrome::kRemoveNonCWSExtensionURL); | 120 return GURL(chrome::kRemoveNonCWSExtensionURL); |
121 } | 121 } |
122 | 122 |
123 base::string16 | 123 base::string16 |
124 SuspiciousExtensionBubbleController::GetActionButtonLabel() const { | 124 SuspiciousExtensionBubbleController::GetActionButtonLabel() const { |
125 return string16(); | 125 return base::string16(); |
126 } | 126 } |
127 | 127 |
128 base::string16 | 128 base::string16 |
129 SuspiciousExtensionBubbleController::GetDismissButtonLabel() const { | 129 SuspiciousExtensionBubbleController::GetDismissButtonLabel() const { |
130 return l10n_util::GetStringUTF16(IDS_EXTENSIONS_SUSPICIOUS_DISABLED_BUTTON); | 130 return l10n_util::GetStringUTF16(IDS_EXTENSIONS_SUSPICIOUS_DISABLED_BUTTON); |
131 } | 131 } |
132 | 132 |
133 bool | 133 bool |
134 SuspiciousExtensionBubbleController::ShouldShowExtensionList() const { | 134 SuspiciousExtensionBubbleController::ShouldShowExtensionList() const { |
135 return true; | 135 return true; |
136 } | 136 } |
137 | 137 |
138 std::vector<string16> | 138 std::vector<base::string16> |
139 SuspiciousExtensionBubbleController::GetExtensions() { | 139 SuspiciousExtensionBubbleController::GetExtensions() { |
140 return GetExtensionList(); | 140 return GetExtensionList(); |
141 } | 141 } |
142 | 142 |
143 void SuspiciousExtensionBubbleController::LogExtensionCount( | 143 void SuspiciousExtensionBubbleController::LogExtensionCount( |
144 size_t count) { | 144 size_t count) { |
145 UMA_HISTOGRAM_COUNTS_100( | 145 UMA_HISTOGRAM_COUNTS_100( |
146 "ExtensionWipeoutBubble.ExtensionWipeoutCount", count); | 146 "ExtensionWipeoutBubble.ExtensionWipeoutCount", count); |
147 } | 147 } |
148 | 148 |
149 void SuspiciousExtensionBubbleController::LogAction( | 149 void SuspiciousExtensionBubbleController::LogAction( |
150 ExtensionMessageBubbleController::BubbleAction action) { | 150 ExtensionMessageBubbleController::BubbleAction action) { |
151 UMA_HISTOGRAM_ENUMERATION( | 151 UMA_HISTOGRAM_ENUMERATION( |
152 "ExtensionWipeoutBubble.UserSelection", | 152 "ExtensionWipeoutBubble.UserSelection", |
153 action, ExtensionMessageBubbleController::ACTION_BOUNDARY); | 153 action, ExtensionMessageBubbleController::ACTION_BOUNDARY); |
154 } | 154 } |
155 | 155 |
156 template <> | 156 template <> |
157 void ProfileKeyedAPIFactory< | 157 void ProfileKeyedAPIFactory< |
158 SuspiciousExtensionBubbleController>::DeclareFactoryDependencies() { | 158 SuspiciousExtensionBubbleController>::DeclareFactoryDependencies() { |
159 DependsOn(extensions::ExtensionSystemFactory::GetInstance()); | 159 DependsOn(extensions::ExtensionSystemFactory::GetInstance()); |
160 } | 160 } |
161 | 161 |
162 } // namespace extensions | 162 } // namespace extensions |
OLD | NEW |