| 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_prefs.h" | 10 #include "chrome/browser/extensions/extension_prefs.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 string16 SuspiciousExtensionBubbleController::GetOverflowText( | 125 string16 SuspiciousExtensionBubbleController::GetOverflowText( |
| 126 const string16& overflow_count) { | 126 const string16& overflow_count) { |
| 127 string16 overflow_string = l10n_util::GetStringUTF16( | 127 string16 overflow_string = l10n_util::GetStringUTF16( |
| 128 IDS_EXTENSIONS_SUSPICIOUS_DISABLED_AND_N_MORE); | 128 IDS_EXTENSIONS_SUSPICIOUS_DISABLED_AND_N_MORE); |
| 129 string16 new_string; | 129 string16 new_string; |
| 130 | 130 |
| 131 // Just before string freeze, we checked in # as a substitution value for | 131 // Just before string freeze, we checked in # as a substitution value for |
| 132 // this string, whereas we should have used $1. It was discovered too late, | 132 // this string, whereas we should have used $1. It was discovered too late, |
| 133 // so we do the substitution by hand in that case. | 133 // so we do the substitution by hand in that case. |
| 134 if (overflow_string.find(ASCIIToUTF16("#")) != string16::npos) { | 134 if (overflow_string.find(ASCIIToUTF16("#")) != string16::npos) { |
| 135 ReplaceChars(overflow_string, ASCIIToUTF16("#").c_str(), | 135 base::ReplaceChars(overflow_string, ASCIIToUTF16("#").c_str(), |
| 136 overflow_count, &new_string); | 136 overflow_count, &new_string); |
| 137 } else { | 137 } else { |
| 138 new_string = l10n_util::GetStringFUTF16( | 138 new_string = l10n_util::GetStringFUTF16( |
| 139 IDS_EXTENSIONS_SUSPICIOUS_DISABLED_AND_N_MORE, | 139 IDS_EXTENSIONS_SUSPICIOUS_DISABLED_AND_N_MORE, |
| 140 overflow_count); | 140 overflow_count); |
| 141 } | 141 } |
| 142 | 142 |
| 143 return new_string; | 143 return new_string; |
| 144 } | 144 } |
| 145 | 145 |
| 146 string16 SuspiciousExtensionBubbleController::GetLearnMoreLabel() { | 146 string16 SuspiciousExtensionBubbleController::GetLearnMoreLabel() { |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 } | 203 } |
| 204 } | 204 } |
| 205 | 205 |
| 206 template <> | 206 template <> |
| 207 void ProfileKeyedAPIFactory< | 207 void ProfileKeyedAPIFactory< |
| 208 SuspiciousExtensionBubbleController>::DeclareFactoryDependencies() { | 208 SuspiciousExtensionBubbleController>::DeclareFactoryDependencies() { |
| 209 DependsOn(extensions::ExtensionSystemFactory::GetInstance()); | 209 DependsOn(extensions::ExtensionSystemFactory::GetInstance()); |
| 210 } | 210 } |
| 211 | 211 |
| 212 } // namespace extensions | 212 } // namespace extensions |
| OLD | NEW |