OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/external_provider_impl.h" | 5 #include "chrome/browser/extensions/external_provider_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 l10n_util::GetParentLocales(g_browser_process->GetApplicationLocale(), | 240 l10n_util::GetParentLocales(g_browser_process->GetApplicationLocale(), |
241 &browser_locales); | 241 &browser_locales); |
242 | 242 |
243 size_t num_locales = supported_locales->GetSize(); | 243 size_t num_locales = supported_locales->GetSize(); |
244 bool locale_supported = false; | 244 bool locale_supported = false; |
245 for (size_t j = 0; j < num_locales; j++) { | 245 for (size_t j = 0; j < num_locales; j++) { |
246 std::string current_locale; | 246 std::string current_locale; |
247 if (supported_locales->GetString(j, ¤t_locale) && | 247 if (supported_locales->GetString(j, ¤t_locale) && |
248 l10n_util::IsValidLocaleSyntax(current_locale)) { | 248 l10n_util::IsValidLocaleSyntax(current_locale)) { |
249 current_locale = l10n_util::NormalizeLocale(current_locale); | 249 current_locale = l10n_util::NormalizeLocale(current_locale); |
250 if (ContainsValue(browser_locales, current_locale)) { | 250 if (base::ContainsValue(browser_locales, current_locale)) { |
251 locale_supported = true; | 251 locale_supported = true; |
252 break; | 252 break; |
253 } | 253 } |
254 } else { | 254 } else { |
255 LOG(WARNING) << "Unrecognized locale '" << current_locale | 255 LOG(WARNING) << "Unrecognized locale '" << current_locale |
256 << "' found as supported locale for extension: " | 256 << "' found as supported locale for extension: " |
257 << extension_id; | 257 << extension_id; |
258 } | 258 } |
259 } | 259 } |
260 | 260 |
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
737 new ExternalProviderImpl( | 737 new ExternalProviderImpl( |
738 service, | 738 service, |
739 new ExternalComponentLoader(profile), | 739 new ExternalComponentLoader(profile), |
740 profile, | 740 profile, |
741 Manifest::INVALID_LOCATION, | 741 Manifest::INVALID_LOCATION, |
742 Manifest::EXTERNAL_COMPONENT, | 742 Manifest::EXTERNAL_COMPONENT, |
743 Extension::FROM_WEBSTORE | Extension::WAS_INSTALLED_BY_DEFAULT))); | 743 Extension::FROM_WEBSTORE | Extension::WAS_INSTALLED_BY_DEFAULT))); |
744 } | 744 } |
745 | 745 |
746 } // namespace extensions | 746 } // namespace extensions |
OLD | NEW |