summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-31 22:15:48 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-31 22:15:48 +0000
commitc743d4c75d3ea1dbe52a943514c8c152b0a5cc39 (patch)
tree64100efb5236f36d238eb42e69b0f5844f7a4e7a
parent5fc9793fc153b3be2376ebfd138ec68e75215cf8 (diff)
downloadchromium_src-c743d4c75d3ea1dbe52a943514c8c152b0a5cc39.zip
chromium_src-c743d4c75d3ea1dbe52a943514c8c152b0a5cc39.tar.gz
chromium_src-c743d4c75d3ea1dbe52a943514c8c152b0a5cc39.tar.bz2
Base: Switch base_i18n to be a separate dll (component build)
BUG=none TEST=none Review URL: http://codereview.chromium.org/7812009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99057 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/base.gyp7
-rw-r--r--base/base.gypi6
-rw-r--r--base/i18n/base_i18n_export.h26
-rw-r--r--base/i18n/bidi_line_iterator.h3
-rw-r--r--base/i18n/break_iterator.h3
-rw-r--r--base/i18n/case_conversion.h5
-rw-r--r--base/i18n/char_iterator.h5
-rw-r--r--base/i18n/file_util_icu.h13
-rw-r--r--base/i18n/icu_encoding_detection.h9
-rw-r--r--base/i18n/icu_string_conversions.h49
-rw-r--r--base/i18n/icu_util.h6
-rw-r--r--base/i18n/number_formatting.h7
-rw-r--r--base/i18n/rtl.h37
-rw-r--r--base/i18n/time_formatting.h22
-rw-r--r--ui/ui_unittests.gypi2
15 files changed, 125 insertions, 75 deletions
diff --git a/base/base.gyp b/base/base.gyp
index 943b4b8..623e6da 100644
--- a/base/base.gyp
+++ b/base/base.gyp
@@ -12,9 +12,10 @@
'targets': [
{
'target_name': 'base_i18n',
- 'type': 'static_library',
+ 'type': '<(component)',
'dependencies': [
'base',
+ 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
'../third_party/icu/icu.gyp:icui18n',
'../third_party/icu/icu.gyp:icuuc',
],
@@ -29,7 +30,11 @@
'export_dependent_settings': [
'base',
],
+ 'defines': [
+ 'BASE_I18N_IMPLEMENTATION',
+ ],
'sources': [
+ 'i18n/base_i18n_export.h',
'i18n/bidi_line_iterator.cc',
'i18n/bidi_line_iterator.h',
'i18n/break_iterator.cc',
diff --git a/base/base.gypi b/base/base.gypi
index 32d0cd0..5aed38c 100644
--- a/base/base.gypi
+++ b/base/base.gypi
@@ -618,9 +618,6 @@
'defines': [
'<@(nacl_win64_defines)',
],
- 'sources': [
- 'i18n/icu_util_nacl_win64.cc',
- ],
'configurations': {
'Common_Base': {
'msvs_target_platform': 'x64',
@@ -636,7 +633,7 @@
},
{
'target_name': 'base_i18n_nacl_win64',
- 'type': 'static_library',
+ 'type': '<(component)',
# TODO(gregoryd): direct_dependent_settings should be shared with the
# 32-bit target, but it doesn't work due to a bug in gyp
'direct_dependent_settings': {
@@ -646,6 +643,7 @@
},
'defines': [
'<@(nacl_win64_defines)',
+ 'BASE_I18N_IMPLEMENTATION',
],
'include_dirs': [
'..',
diff --git a/base/i18n/base_i18n_export.h b/base/i18n/base_i18n_export.h
new file mode 100644
index 0000000..143f75f
--- /dev/null
+++ b/base/i18n/base_i18n_export.h
@@ -0,0 +1,26 @@
+// 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.
+
+#ifndef BASE_I18N_BASE_I18N_EXPORT_H_
+#define BASE_I18N_BASE_I18N_EXPORT_H_
+#pragma once
+
+#if defined(COMPONENT_BUILD)
+#if defined(WIN32)
+
+#if defined(BASE_I18N_IMPLEMENTATION)
+#define BASE_I18N_EXPORT __declspec(dllexport)
+#else
+#define BASE_I18N_EXPORT __declspec(dllimport)
+#endif // defined(BASE_I18N_IMPLEMENTATION)
+
+#else // defined(WIN32)
+#define BASE_I18N_EXPORT __attribute__((visibility("default")))
+#endif
+
+#else // defined(COMPONENT_BUILD)
+#define BASE_I18N_EXPORT
+#endif
+
+#endif // BASE_I18N_BASE_I18N_EXPORT_H_
diff --git a/base/i18n/bidi_line_iterator.h b/base/i18n/bidi_line_iterator.h
index 5fff6a3..3beddf2 100644
--- a/base/i18n/bidi_line_iterator.h
+++ b/base/i18n/bidi_line_iterator.h
@@ -9,6 +9,7 @@
#include "unicode/ubidi.h"
#include "base/basictypes.h"
+#include "base/i18n/base_i18n_export.h"
#include "base/string16.h"
namespace base {
@@ -17,7 +18,7 @@ namespace i18n {
// A simple wrapper class for the bidirectional iterator of ICU.
// This class uses the bidirectional iterator of ICU to split a line of
// bidirectional texts into visual runs in its display order.
-class BiDiLineIterator {
+class BASE_I18N_EXPORT BiDiLineIterator {
public:
BiDiLineIterator();
~BiDiLineIterator();
diff --git a/base/i18n/break_iterator.h b/base/i18n/break_iterator.h
index e49b46e..f375962 100644
--- a/base/i18n/break_iterator.h
+++ b/base/i18n/break_iterator.h
@@ -8,6 +8,7 @@
#include "base/basictypes.h"
#include "base/string16.h"
+#include "base/i18n/base_i18n_export.h"
// The BreakIterator class iterates through the words, word breaks, and
// line breaks in a UTF-16 string.
@@ -55,7 +56,7 @@
namespace base {
namespace i18n {
-class BreakIterator {
+class BASE_I18N_EXPORT BreakIterator {
public:
enum BreakType {
BREAK_WORD,
diff --git a/base/i18n/case_conversion.h b/base/i18n/case_conversion.h
index 73dd862..be321d4 100644
--- a/base/i18n/case_conversion.h
+++ b/base/i18n/case_conversion.h
@@ -6,16 +6,17 @@
#define BASE_I18N_CASE_CONVERSION_H_
#pragma once
+#include "base/i18n/base_i18n_export.h"
#include "base/string_piece.h"
namespace base {
namespace i18n {
// Returns the lower case equivalent of string. Uses ICU's default locale.
-string16 ToLower(const StringPiece16& string);
+BASE_I18N_EXPORT string16 ToLower(const StringPiece16& string);
// Returns the upper case equivalent of string. Uses ICU's default locale.
-string16 ToUpper(const StringPiece16& string);
+BASE_I18N_EXPORT string16 ToUpper(const StringPiece16& string);
} // namespace i18n
} // namespace base
diff --git a/base/i18n/char_iterator.h b/base/i18n/char_iterator.h
index bd7cc9f..ab2af3c 100644
--- a/base/i18n/char_iterator.h
+++ b/base/i18n/char_iterator.h
@@ -9,6 +9,7 @@
#include <string>
#include "base/basictypes.h"
+#include "base/i18n/base_i18n_export.h"
#include "base/string16.h"
// The CharIterator classes iterate through the characters in UTF8 and
@@ -27,7 +28,7 @@ typedef unsigned char uint8_t;
namespace base {
namespace i18n {
-class UTF8CharIterator {
+class BASE_I18N_EXPORT UTF8CharIterator {
public:
// Requires |str| to live as long as the UTF8CharIterator does.
UTF8CharIterator(const std::string* str);
@@ -73,7 +74,7 @@ class UTF8CharIterator {
DISALLOW_COPY_AND_ASSIGN(UTF8CharIterator);
};
-class UTF16CharIterator {
+class BASE_I18N_EXPORT UTF16CharIterator {
public:
// Requires |str| to live as long as the UTF16CharIterator does.
UTF16CharIterator(const string16* str);
diff --git a/base/i18n/file_util_icu.h b/base/i18n/file_util_icu.h
index a855eb3..57acea6 100644
--- a/base/i18n/file_util_icu.h
+++ b/base/i18n/file_util_icu.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -9,13 +9,14 @@
// File utilities that use the ICU library go in this file.
#include "base/file_path.h"
+#include "base/i18n/base_i18n_export.h"
#include "base/string16.h"
namespace file_util {
// Returns true if file_name does not have any illegal character. The input
// param has the same restriction as that for ReplaceIllegalCharacters.
-bool IsFilenameLegal(const string16& file_name);
+BASE_I18N_EXPORT bool IsFilenameLegal(const string16& file_name);
// Replaces characters in 'file_name' that are illegal for file names with
// 'replace_char'. 'file_name' must not be a full or relative path, but just the
@@ -24,13 +25,15 @@ bool IsFilenameLegal(const string16& file_name);
// Example:
// file_name == "bad:file*name?.txt", changed to: "bad-file-name-.txt" when
// 'replace_char' is '-'.
-void ReplaceIllegalCharactersInPath(FilePath::StringType* file_name,
- char replace_char);
+BASE_I18N_EXPORT void ReplaceIllegalCharactersInPath(
+ FilePath::StringType* file_name,
+ char replace_char);
// Compares two filenames using the current locale information. This can be
// used to sort directory listings. It behaves like "operator<" for use in
// std::sort.
-bool LocaleAwareCompareFilenames(const FilePath& a, const FilePath& b);
+BASE_I18N_EXPORT bool LocaleAwareCompareFilenames(const FilePath& a,
+ const FilePath& b);
} // namespace file_util
diff --git a/base/i18n/icu_encoding_detection.h b/base/i18n/icu_encoding_detection.h
index 06c2567..c97d45a 100644
--- a/base/i18n/icu_encoding_detection.h
+++ b/base/i18n/icu_encoding_detection.h
@@ -9,19 +9,22 @@
#include <string>
#include <vector>
+#include "base/i18n/base_i18n_export.h"
+
namespace base {
// Detect encoding of |text| and put the name of encoding (as returned by ICU)
// in |encoding|. For ASCII texts |encoding| will be set to an empty string.
// Returns true on success.
-bool DetectEncoding(const std::string& text, std::string* encoding);
+BASE_I18N_EXPORT bool DetectEncoding(const std::string& text,
+ std::string* encoding);
// Detect all possible encodings of |text| and put their names
// (as returned by ICU) in |encodings|. Returns true on success.
// Note: this function may return encodings that may fail to decode |text|,
// the caller is responsible for handling that.
-bool DetectAllEncodings(const std::string& text,
- std::vector<std::string>* encodings);
+BASE_I18N_EXPORT bool DetectAllEncodings(const std::string& text,
+ std::vector<std::string>* encodings);
} // namespace base
diff --git a/base/i18n/icu_string_conversions.h b/base/i18n/icu_string_conversions.h
index 901771b..b29d7b7 100644
--- a/base/i18n/icu_string_conversions.h
+++ b/base/i18n/icu_string_conversions.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// 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.
@@ -8,6 +8,7 @@
#include <string>
+#include "base/i18n/base_i18n_export.h"
#include "base/string16.h"
namespace base {
@@ -35,40 +36,40 @@ class OnStringConversionError {
};
// Names of codepages (charsets) understood by icu.
-extern const char kCodepageLatin1[]; // a.k.a. ISO 8859-1
-extern const char kCodepageUTF8[];
-extern const char kCodepageUTF16BE[];
-extern const char kCodepageUTF16LE[];
+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.
-bool UTF16ToCodepage(const string16& utf16,
- const char* codepage_name,
- OnStringConversionError::Type on_error,
- std::string* encoded);
-bool CodepageToUTF16(const std::string& encoded,
- const char* codepage_name,
- OnStringConversionError::Type on_error,
- string16* utf16);
+BASE_I18N_EXPORT bool UTF16ToCodepage(const string16& utf16,
+ const char* codepage_name,
+ OnStringConversionError::Type on_error,
+ std::string* encoded);
+BASE_I18N_EXPORT bool CodepageToUTF16(const std::string& encoded,
+ const char* codepage_name,
+ OnStringConversionError::Type on_error,
+ string16* utf16);
// Converts between wide strings and the encoding specified. If the
// encoding doesn't exist or the encoding fails (when on_error is FAIL),
// returns false.
-bool WideToCodepage(const std::wstring& wide,
- const char* codepage_name,
- OnStringConversionError::Type on_error,
- std::string* encoded);
-bool CodepageToWide(const std::string& encoded,
- const char* codepage_name,
- OnStringConversionError::Type on_error,
- std::wstring* wide);
+BASE_I18N_EXPORT bool WideToCodepage(const std::wstring& wide,
+ const char* codepage_name,
+ OnStringConversionError::Type on_error,
+ std::string* encoded);
+BASE_I18N_EXPORT bool CodepageToWide(const std::string& encoded,
+ const char* codepage_name,
+ OnStringConversionError::Type on_error,
+ std::wstring* wide);
// Converts from any codepage to UTF-8 and ensures the resulting UTF-8 is
// normalized.
-bool ConvertToUtf8AndNormalize(const std::string& text,
- const std::string& charset,
- std::string* result);
+BASE_I18N_EXPORT bool ConvertToUtf8AndNormalize(const std::string& text,
+ const std::string& charset,
+ std::string* result);
} // namespace base
diff --git a/base/i18n/icu_util.h b/base/i18n/icu_util.h
index 35c2e4f..f9f0530 100644
--- a/base/i18n/icu_util.h
+++ b/base/i18n/icu_util.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// 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.
@@ -6,11 +6,13 @@
#define BASE_I18N_ICU_UTIL_H_
#pragma once
+#include "base/i18n/base_i18n_export.h"
+
namespace icu_util {
// Call this function to load ICU's data tables for the current process. This
// function should be called before ICU is used.
-bool Initialize();
+BASE_I18N_EXPORT bool Initialize();
} // namespace icu_util
diff --git a/base/i18n/number_formatting.h b/base/i18n/number_formatting.h
index 5df7f17..52d276c 100644
--- a/base/i18n/number_formatting.h
+++ b/base/i18n/number_formatting.h
@@ -7,6 +7,7 @@
#pragma once
#include "base/basictypes.h"
+#include "base/i18n/base_i18n_export.h"
#include "base/string16.h"
namespace base {
@@ -14,18 +15,18 @@ namespace base {
// Return a number formatted with separators in the user's locale.
// Ex: FormatNumber(1234567)
// => "1,234,567" in English, "1.234.567" in German
-string16 FormatNumber(int64 number);
+BASE_I18N_EXPORT string16 FormatNumber(int64 number);
// Return a number formatted with separators in the user's locale.
// Ex: FormatDouble(1234567.8, 1)
// => "1,234,567.8" in English, "1.234.567,8" in German
-string16 FormatDouble(double number, int fractional_digits);
+BASE_I18N_EXPORT string16 FormatDouble(double number, int fractional_digits);
namespace testing {
// Causes cached formatters to be discarded and recreated. Only useful for
// testing.
-void ResetFormatters();
+BASE_I18N_EXPORT void ResetFormatters();
} // namespace testing
diff --git a/base/i18n/rtl.h b/base/i18n/rtl.h
index 757457a..472a221 100644
--- a/base/i18n/rtl.h
+++ b/base/i18n/rtl.h
@@ -9,6 +9,7 @@
#include <string>
#include "base/compiler_specific.h"
+#include "base/i18n/base_i18n_export.h"
#include "base/string16.h"
#include "build/build_config.h"
@@ -34,10 +35,10 @@ enum TextDirection {
// Get the locale that the currently running process has been configured to use.
// The return value is of the form language[-country] (e.g., en-US) where the
// language is the 2 or 3 letter code from ISO-639.
-std::string GetConfiguredLocale();
+BASE_I18N_EXPORT std::string GetConfiguredLocale();
// Canonicalize a string (eg. a POSIX locale string) to a Chrome locale name.
-std::string GetCanonicalLocale(const char* locale);
+BASE_I18N_EXPORT std::string GetCanonicalLocale(const char* locale);
// Sets the default locale of ICU.
// Once the application locale of Chrome in GetApplicationLocale is determined,
@@ -46,19 +47,20 @@ std::string GetCanonicalLocale(const char* locale);
// This is handy in that we don't have to call GetApplicationLocale()
// everytime we call locale-dependent ICU APIs as long as we make sure
// that this is called before any locale-dependent API is called.
-void SetICUDefaultLocale(const std::string& locale_string);
+BASE_I18N_EXPORT void SetICUDefaultLocale(const std::string& locale_string);
// Returns true if the application text direction is right-to-left.
-bool IsRTL();
+BASE_I18N_EXPORT bool IsRTL();
// Returns whether the text direction for the default ICU locale is RTL. This
// assumes that SetICUDefaultLocale has been called to set the default locale to
// the UI locale of Chrome.
// NOTE: Generally, you should call IsRTL() instead of this.
-bool ICUIsRTL();
+BASE_I18N_EXPORT bool ICUIsRTL();
// Returns the text direction for |locale_name|.
-TextDirection GetTextDirectionForLocale(const char* locale_name);
+BASE_I18N_EXPORT TextDirection GetTextDirectionForLocale(
+ const char* locale_name);
// Given the string in |text|, returns the directionality of the first
// character with strong directionality in the string. If no character in the
@@ -66,7 +68,8 @@ TextDirection GetTextDirectionForLocale(const char* locale_name);
// character types L, LRE, LRO, R, AL, RLE, and RLO are considered as strong
// directionality characters. Please refer to http://unicode.org/reports/tr9/
// for more information.
-TextDirection GetFirstStrongCharacterDirection(const string16& text);
+BASE_I18N_EXPORT TextDirection GetFirstStrongCharacterDirection(
+ const string16& text);
// Given the string in |text|, this function modifies the string in place with
// the appropriate Unicode formatting marks that mark the string direction
@@ -90,43 +93,43 @@ TextDirection GetFirstStrongCharacterDirection(const string16& text);
// installed. Since the English version of Windows doesn't have right-to-left
// language support installed by default, inserting the direction Unicode mark
// results in Windows displaying squares.
-bool AdjustStringForLocaleDirection(string16* text);
+BASE_I18N_EXPORT bool AdjustStringForLocaleDirection(string16* text);
// Returns true if the string contains at least one character with strong right
// to left directionality; that is, a character with either R or AL Unicode
// BiDi character type.
-bool StringContainsStrongRTLChars(const string16& text);
+BASE_I18N_EXPORT bool StringContainsStrongRTLChars(const string16& text);
// Wraps a string with an LRE-PDF pair which essentialy marks the string as a
// Left-To-Right string. Doing this is useful in order to make sure LTR
// strings are rendered properly in an RTL context.
-void WrapStringWithLTRFormatting(string16* text);
+BASE_I18N_EXPORT void WrapStringWithLTRFormatting(string16* text);
// Wraps a string with an RLE-PDF pair which essentialy marks the string as a
// Right-To-Left string. Doing this is useful in order to make sure RTL
// strings are rendered properly in an LTR context.
-void WrapStringWithRTLFormatting(string16* text);
+BASE_I18N_EXPORT void WrapStringWithRTLFormatting(string16* text);
// Wraps file path to get it to display correctly in RTL UI. All filepaths
// should be passed through this function before display in UI for RTL locales.
-void WrapPathWithLTRFormatting(const FilePath& path,
- string16* rtl_safe_path);
+BASE_I18N_EXPORT void WrapPathWithLTRFormatting(const FilePath& path,
+ string16* rtl_safe_path);
// Given the string in |text|, this function returns the adjusted string having
// LTR directionality for display purpose. Which means that in RTL locale the
// string is wrapped with LRE (Left-To-Right Embedding) and PDF (Pop
// Directional Formatting) marks and returned. In LTR locale, the string itself
// is returned.
-string16 GetDisplayStringInLTRDirectionality(const string16& text)
- WARN_UNUSED_RESULT;
+BASE_I18N_EXPORT string16 GetDisplayStringInLTRDirectionality(
+ const string16& text) WARN_UNUSED_RESULT;
// Strip the beginning (U+202A..U+202B, U+202D..U+202E) and/or ending (U+202C)
// explicit bidi control characters from |text|, if there are any. Otherwise,
// return the text itself. Explicit bidi control characters display and have
// semantic effect. They can be deleted so they might not always appear in a
// pair.
-const string16 StripWrappingBidiControlCharacters(const string16& text)
- WARN_UNUSED_RESULT;
+BASE_I18N_EXPORT const string16 StripWrappingBidiControlCharacters(
+ const string16& text) WARN_UNUSED_RESULT;
} // namespace i18n
} // namespace base
diff --git a/base/i18n/time_formatting.h b/base/i18n/time_formatting.h
index 85c0169..3c2c5b1 100644
--- a/base/i18n/time_formatting.h
+++ b/base/i18n/time_formatting.h
@@ -9,6 +9,7 @@
#define BASE_I18N_TIME_FORMATTING_H_
#pragma once
+#include "base/i18n/base_i18n_export.h"
#include "base/string16.h"
namespace base {
@@ -28,37 +29,38 @@ enum AmPmClockType {
};
// Returns the time of day, e.g., "3:07 PM".
-string16 TimeFormatTimeOfDay(const Time& time);
+BASE_I18N_EXPORT string16 TimeFormatTimeOfDay(const Time& time);
// Returns the time of day in the specified hour clock type. e.g.
// "3:07 PM" (type == k12HourClock, ampm == kKeepAmPm).
// "3:07" (type == k12HourClock, ampm == kDropAmPm).
// "15:07" (type == k24HourClock).
-string16 TimeFormatTimeOfDayWithHourClockType(const Time& time,
- HourClockType type,
- AmPmClockType ampm);
+BASE_I18N_EXPORT string16 TimeFormatTimeOfDayWithHourClockType(
+ const Time& time,
+ HourClockType type,
+ AmPmClockType ampm);
// Returns a shortened date, e.g. "Nov 7, 2007"
-string16 TimeFormatShortDate(const Time& time);
+BASE_I18N_EXPORT string16 TimeFormatShortDate(const Time& time);
// Returns a numeric date such as 12/13/52.
-string16 TimeFormatShortDateNumeric(const Time& time);
+BASE_I18N_EXPORT string16 TimeFormatShortDateNumeric(const Time& time);
// Returns a numeric date and time such as "12/13/52 2:44:30 PM".
-string16 TimeFormatShortDateAndTime(const Time& time);
+BASE_I18N_EXPORT string16 TimeFormatShortDateAndTime(const Time& time);
// Formats a time in a friendly sentence format, e.g.
// "Monday, March 6, 2008 2:44:30 PM".
-string16 TimeFormatFriendlyDateAndTime(const Time& time);
+BASE_I18N_EXPORT string16 TimeFormatFriendlyDateAndTime(const Time& time);
// Formats a time in a friendly sentence format, e.g.
// "Monday, March 6, 2008".
-string16 TimeFormatFriendlyDate(const Time& time);
+BASE_I18N_EXPORT string16 TimeFormatFriendlyDate(const Time& time);
// Gets the hour clock type of the current locale. e.g.
// k12HourClock (en-US).
// k24HourClock (en-GB).
-HourClockType GetHourClockType();
+BASE_I18N_EXPORT HourClockType GetHourClockType();
} // namespace base
diff --git a/ui/ui_unittests.gypi b/ui/ui_unittests.gypi
index f506967..b395588 100644
--- a/ui/ui_unittests.gypi
+++ b/ui/ui_unittests.gypi
@@ -14,6 +14,8 @@
'../skia/skia.gyp:skia',
'../testing/gmock.gyp:gmock',
'../testing/gtest.gyp:gtest',
+ '../third_party/icu/icu.gyp:icui18n',
+ '../third_party/icu/icu.gyp:icuuc',
'ui',
'gfx_resources',
],