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 "base/i18n/icu_util.h" | 5 #include "base/i18n/icu_util.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
10 #include <windows.h> | 10 #include <windows.h> |
11 #endif | 11 #endif |
12 | 12 |
13 #include <string> | 13 #include <string> |
14 | 14 |
15 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
16 #include "base/files/memory_mapped_file.h" | 16 #include "base/files/memory_mapped_file.h" |
17 #include "base/logging.h" | 17 #include "base/logging.h" |
18 #include "base/path_service.h" | 18 #include "base/path_service.h" |
19 #include "base/strings/string_util.h" | 19 #include "base/strings/string_util.h" |
20 #include "base/strings/sys_string_conversions.h" | 20 #include "base/strings/sys_string_conversions.h" |
21 #include "third_party/icu/public/common/unicode/putil.h" | 21 #include "third_party/icu/source/common/unicode/putil.h" |
22 #include "third_party/icu/public/common/unicode/udata.h" | 22 #include "third_party/icu/source/common/unicode/udata.h" |
23 | 23 |
24 #if defined(OS_MACOSX) | 24 #if defined(OS_MACOSX) |
25 #include "base/mac/foundation_util.h" | 25 #include "base/mac/foundation_util.h" |
26 #endif | 26 #endif |
27 | 27 |
28 #define ICU_UTIL_DATA_FILE 0 | 28 #define ICU_UTIL_DATA_FILE 0 |
29 #define ICU_UTIL_DATA_SHARED 1 | 29 #define ICU_UTIL_DATA_SHARED 1 |
30 #define ICU_UTIL_DATA_STATIC 2 | 30 #define ICU_UTIL_DATA_STATIC 2 |
31 | 31 |
32 #ifndef ICU_UTIL_DATA_IMPL | 32 #ifndef ICU_UTIL_DATA_IMPL |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 } | 126 } |
127 } | 127 } |
128 UErrorCode err = U_ZERO_ERROR; | 128 UErrorCode err = U_ZERO_ERROR; |
129 udata_setCommonData(const_cast<uint8*>(mapped_file.data()), &err); | 129 udata_setCommonData(const_cast<uint8*>(mapped_file.data()), &err); |
130 return err == U_ZERO_ERROR; | 130 return err == U_ZERO_ERROR; |
131 #endif // OS check | 131 #endif // OS check |
132 #endif | 132 #endif |
133 } | 133 } |
134 | 134 |
135 } // namespace icu_util | 135 } // namespace icu_util |
OLD | NEW |