OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <string> | 5 #include <string> |
6 | 6 |
7 #if defined(OS_CHROMEOS) | 7 #if defined(OS_CHROMEOS) |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #endif | 10 #endif |
11 | 11 |
12 namespace l10n_util { | 12 namespace l10n_util { |
13 | 13 |
14 bool IsLocaleSupportedByOS(const std::string& locale) { | 14 bool IsLocaleSupportedByOS(const std::string& locale) { |
15 #if defined(OS_CHROMEOS) | 15 #if defined(OS_CHROMEOS) |
16 // We don't have translations yet for am, and sw. | 16 // We don't have translations yet for am, and sw. |
17 // TODO(jungshik): Once the above issues are resolved, change this back | 17 // TODO(jungshik): Once the above issues are resolved, change this back |
18 // to return true. | 18 // to return true. |
19 static const char kUnsupportedLocales[][3] = {"am", "sw"}; | 19 static const char kUnsupportedLocales[][3] = {"am", "sw"}; |
20 for (size_t i = 0; i < arraysize(kUnsupportedLocales); ++i) { | 20 for (size_t i = 0; i < arraysize(kUnsupportedLocales); ++i) { |
21 if (LowerCaseEqualsASCII(locale, kUnsupportedLocales[i])) | 21 if (base::LowerCaseEqualsASCII(locale, kUnsupportedLocales[i])) |
22 return false; | 22 return false; |
23 } | 23 } |
24 return true; | 24 return true; |
25 #else | 25 #else |
26 // Return true blindly for now. | 26 // Return true blindly for now. |
27 return true; | 27 return true; |
28 #endif | 28 #endif |
29 } | 29 } |
30 | 30 |
31 } // namespace l10n_util | 31 } // namespace l10n_util |
OLD | NEW |