diff options
author | jshin@chromium.org <jshin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-18 05:12:29 +0000 |
---|---|---|
committer | jshin@chromium.org <jshin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-18 05:12:29 +0000 |
commit | b5b2385af64eb08b1feb53fb0ad65c835f472912 (patch) | |
tree | 6af57cd4a4965cebe2107e07ca8e563444c3afe9 /app/l10n_util.h | |
parent | 80d6524d33061e0e4f7b06dd87ee94de3e05c7a8 (diff) | |
download | chromium_src-b5b2385af64eb08b1feb53fb0ad65c835f472912.zip chromium_src-b5b2385af64eb08b1feb53fb0ad65c835f472912.tar.gz chromium_src-b5b2385af64eb08b1feb53fb0ad65c835f472912.tar.bz2 |
Use 'icu::' namespace explicitly throughout Chrome tree instead of relying on 'using namespace icu'.
This is Chrome's counterpart to the ICU header change that disables
'using namespace icu' (http://codereview.chromium.org/171010/show), which is required to avoid the name colission between Chrome's StringPiece (in base) and ICU's StringPiece.
The webkit change (which is minor) will be dealt with in the webkit bugzilla.
This can go in before the ICU change/upgrade without affecting anything.
BUG=8198
TEST=All the targets are built without an error on all platforms.
Review URL: http://codereview.chromium.org/171012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23613 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/l10n_util.h')
-rw-r--r-- | app/l10n_util.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/app/l10n_util.h b/app/l10n_util.h index 0944912..37a40cd 100644 --- a/app/l10n_util.h +++ b/app/l10n_util.h @@ -261,7 +261,7 @@ void WrapPathWithLTRFormatting(const FilePath& path, int DefaultCanvasTextAlignment(); // Compares the two strings using the specified collator. -UCollationResult CompareStringWithCollator(const Collator* collator, +UCollationResult CompareStringWithCollator(const icu::Collator* collator, const std::wstring& lhs, const std::wstring& rhs); @@ -273,7 +273,7 @@ class StringMethodComparatorWithCollator : const std::wstring&, bool> { public: - StringMethodComparatorWithCollator(Collator* collator, Method method) + StringMethodComparatorWithCollator(icu::Collator* collator, Method method) : collator_(collator), method_(method) { } @@ -284,7 +284,7 @@ class StringMethodComparatorWithCollator : } private: - Collator* collator_; + icu::Collator* collator_; Method method_; }; @@ -314,8 +314,8 @@ void SortStringsUsingMethod(const std::wstring& locale, std::vector<T*>* elements, Method method) { UErrorCode error = U_ZERO_ERROR; - Locale loc(WideToUTF8(locale).c_str()); - scoped_ptr<Collator> collator(Collator::createInstance(loc, error)); + icu::Locale loc(WideToUTF8(locale).c_str()); + scoped_ptr<icu::Collator> collator(icu::Collator::createInstance(loc, error)); if (U_FAILURE(error)) { sort(elements->begin(), elements->end(), StringMethodComparator<T,Method>(method)); @@ -336,7 +336,7 @@ class StringComparator : public std::binary_function<const Element&, const Element&, bool> { public: - explicit StringComparator(Collator* collator) + explicit StringComparator(icu::Collator* collator) : collator_(collator) { } // Returns true if lhs precedes rhs. @@ -349,7 +349,7 @@ class StringComparator : public std::binary_function<const Element&, } private: - Collator* collator_; + icu::Collator* collator_; }; // Specialization of operator() method for std::wstring version. @@ -371,8 +371,8 @@ void SortVectorWithStringKey(const std::string& locale, DCHECK(begin_index >= 0 && begin_index < end_index && end_index <= static_cast<unsigned int>(elements->size())); UErrorCode error = U_ZERO_ERROR; - Locale loc(locale.c_str()); - scoped_ptr<Collator> collator(Collator::createInstance(loc, error)); + icu::Locale loc(locale.c_str()); + scoped_ptr<icu::Collator> collator(icu::Collator::createInstance(loc, error)); if (U_FAILURE(error)) collator.reset(); StringComparator<Element> c(collator.get()); |