diff options
author | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-22 00:18:12 +0000 |
---|---|---|
committer | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-22 00:18:12 +0000 |
commit | f80aa37e487d5110edc097bfd0c33d4b17637eb2 (patch) | |
tree | 230b24b601c2792d147375ead85cc4e5e981b1de | |
parent | 9ebadeaa244b6bddce117d22e7e6158fe9f6a3c6 (diff) | |
download | chromium_src-f80aa37e487d5110edc097bfd0c33d4b17637eb2.zip chromium_src-f80aa37e487d5110edc097bfd0c33d4b17637eb2.tar.gz chromium_src-f80aa37e487d5110edc097bfd0c33d4b17637eb2.tar.bz2 |
Moving ICU constants to separate OBJ for split-link
Else the exports are not just functions and that causes
problems in split link mode.
NOTRY=true
TBR=brettw
BUG=237249
TEST=it builds
Review URL: https://chromiumcodereview.appspot.com/15358006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201399 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/base.gyp | 2 | ||||
-rw-r--r-- | base/i18n/i18n_constants.cc | 15 | ||||
-rw-r--r-- | base/i18n/i18n_constants.h | 20 | ||||
-rw-r--r-- | base/i18n/icu_string_conversions.cc | 5 | ||||
-rw-r--r-- | base/i18n/icu_string_conversions.h | 7 | ||||
-rw-r--r-- | build/split_link_partition.py | 1 |
6 files changed, 39 insertions, 11 deletions
diff --git a/base/base.gyp b/base/base.gyp index f0264a3..19e8af1 100644 --- a/base/base.gyp +++ b/base/base.gyp @@ -316,6 +316,8 @@ 'i18n/case_conversion.h', 'i18n/file_util_icu.cc', 'i18n/file_util_icu.h', + 'i18n/i18n_constants.cc', + 'i18n/i18n_constants.h', 'i18n/icu_encoding_detection.cc', 'i18n/icu_encoding_detection.h', 'i18n/icu_string_conversions.cc', diff --git a/base/i18n/i18n_constants.cc b/base/i18n/i18n_constants.cc new file mode 100644 index 0000000..9b8c571 --- /dev/null +++ b/base/i18n/i18n_constants.cc @@ -0,0 +1,15 @@ +// Copyright (c) 2011 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. + +#include "base/i18n/i18n_constants.h" + +namespace base { + +const char kCodepageLatin1[] = "ISO-8859-1"; +const char kCodepageUTF8[] = "UTF-8"; +const char kCodepageUTF16BE[] = "UTF-16BE"; +const char kCodepageUTF16LE[] = "UTF-16LE"; + +} // namespace base + diff --git a/base/i18n/i18n_constants.h b/base/i18n/i18n_constants.h new file mode 100644 index 0000000..c2de842 --- /dev/null +++ b/base/i18n/i18n_constants.h @@ -0,0 +1,20 @@ +// Copyright (c) 2013 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 BASE_I18N_I18N_CONSTANTS_H_ +#define BASE_I18N_I18N_CONSTANTS_H_ + +#include "base/i18n/base_i18n_export.h" + +namespace base { + +// Names of codepages (charsets) understood by icu. +BASE_I18N_EXPORT extern const char kCodepageLatin1[]; // a.k.a. ISO 8859-1 +BASE_I18N_EXPORT extern const char kCodepageUTF8[]; +BASE_I18N_EXPORT extern const char kCodepageUTF16BE[]; +BASE_I18N_EXPORT extern const char kCodepageUTF16LE[]; + +} // namespace base + +#endif // BASE_I18N_I18N_CONSTANTS_H_ diff --git a/base/i18n/icu_string_conversions.cc b/base/i18n/icu_string_conversions.cc index 2ff5009..292d614 100644 --- a/base/i18n/icu_string_conversions.cc +++ b/base/i18n/icu_string_conversions.cc @@ -144,11 +144,6 @@ inline UConverterType utf32_platform_endian() { } // namespace -const char kCodepageLatin1[] = "ISO-8859-1"; -const char kCodepageUTF8[] = "UTF-8"; -const char kCodepageUTF16BE[] = "UTF-16BE"; -const char kCodepageUTF16LE[] = "UTF-16LE"; - // Codepage <-> Wide/UTF-16 --------------------------------------------------- bool UTF16ToCodepage(const string16& utf16, diff --git a/base/i18n/icu_string_conversions.h b/base/i18n/icu_string_conversions.h index 31a57df..24b687d 100644 --- a/base/i18n/icu_string_conversions.h +++ b/base/i18n/icu_string_conversions.h @@ -8,6 +8,7 @@ #include <string> #include "base/i18n/base_i18n_export.h" +#include "base/i18n/i18n_constants.h" #include "base/string16.h" namespace base { @@ -34,12 +35,6 @@ class OnStringConversionError { OnStringConversionError(); }; -// Names of codepages (charsets) understood by icu. -BASE_I18N_EXPORT extern const char kCodepageLatin1[]; // a.k.a. ISO 8859-1 -BASE_I18N_EXPORT extern const char kCodepageUTF8[]; -BASE_I18N_EXPORT extern const char kCodepageUTF16BE[]; -BASE_I18N_EXPORT extern const char kCodepageUTF16LE[]; - // Converts between UTF-16 strings and the encoding specified. If the // encoding doesn't exist or the encoding fails (when on_error is FAIL), // returns false. diff --git a/build/split_link_partition.py b/build/split_link_partition.py index c8b9a7b..be3a41b 100644 --- a/build/split_link_partition.py +++ b/build/split_link_partition.py @@ -126,6 +126,7 @@ 'all_from_libs': [ (r'autofill_common\.lib$', r'switches\.obj$'), (r'\bbase\.lib$', r'string_util_constants\.obj$'), + (r'\bbase_i18n\.lib$', r'i18n_constants\.obj$'), (r'base_static\.lib$', r'base_switches\.obj$'), (r'\bbase\.lib$', r'file_path_constants\.obj$'), (r'\bcc\.lib$', r'switches\.obj$'), |