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/common/extensions/extension_l10n_util.h" | 5 #include "chrome/common/extensions/extension_l10n_util.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 | 347 |
348 if (std::find(subdir.begin(), subdir.end(), '.') != subdir.end()) | 348 if (std::find(subdir.begin(), subdir.end(), '.') != subdir.end()) |
349 return true; | 349 return true; |
350 | 350 |
351 if (all_locales.find(subdir) == all_locales.end()) | 351 if (all_locales.find(subdir) == all_locales.end()) |
352 return true; | 352 return true; |
353 | 353 |
354 return false; | 354 return false; |
355 } | 355 } |
356 | 356 |
| 357 ScopedLocaleForTest::ScopedLocaleForTest() |
| 358 : locale_(extension_l10n_util::CurrentLocaleOrDefault()) {} |
| 359 |
| 360 ScopedLocaleForTest::ScopedLocaleForTest(const std::string& locale) |
| 361 : locale_(extension_l10n_util::CurrentLocaleOrDefault()) { |
| 362 extension_l10n_util::SetProcessLocale(locale); |
| 363 } |
| 364 |
| 365 ScopedLocaleForTest::~ScopedLocaleForTest() { |
| 366 extension_l10n_util::SetProcessLocale(locale_); |
| 367 } |
| 368 |
357 } // namespace extension_l10n_util | 369 } // namespace extension_l10n_util |
OLD | NEW |