Chromium Code Reviews| Index: base/i18n/icu_test_util.h |
| diff --git a/base/i18n/icu_test_util.h b/base/i18n/icu_test_util.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b3ce0a75b7b55bf8604371fd7b7ee8f91ee71765 |
| --- /dev/null |
| +++ b/base/i18n/icu_test_util.h |
| @@ -0,0 +1,28 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef ICU_TEST_UTIL_H_ |
|
Mark Mentovai
2015/08/18 14:40:07
Full paths: BASE_ICU_TEST_UTIL_H_.
|
| +#define ICU_TEST_UTIL_H_ |
| + |
| +#include "base/i18n/rtl.h" |
| + |
| +namespace base { |
| +namespace i18n { |
| + |
| +class ScopedSetICUDefaultLocale { |
| + std::string default_locale; |
|
Mark Mentovai
2015/08/18 14:40:07
Please follow the style guide: public: before priv
|
| + |
| + public: |
| +ScopedSetICUDefaultLocale(std::string locale) |
|
Mark Mentovai
2015/08/18 14:40:07
Use proper indentation per the style guide.
Mark Mentovai
2015/08/18 14:40:07
Since every caller passes uloc_getDefault(), the c
|
| + : default_locale(locale) {} |
|
Mark Mentovai
2015/08/18 14:40:07
You should split this up into a .h and a .cc. They
|
| + |
| +~ScopedSetICUDefaultLocale() { |
| + i18n::SetICUDefaultLocale(default_locale.data()); |
| +} |
| +}; |
| + |
| + |
| +} // namespace i18n |
| +} // namespace base |
| +#endif |
|
Mark Mentovai
2015/08/18 14:40:07
Blank line before, and make this
#endif // BASE_
|