Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Unified Diff: sky/engine/wtf/unicode/icu/CollatorICU.cpp

Issue 709603006: Remove a bunch of OS(MACOSX) code (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Even more Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« sky/engine/wtf/StringExtras.h ('K') | « sky/engine/wtf/text/ASCIIFastPath.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/wtf/unicode/icu/CollatorICU.cpp
diff --git a/sky/engine/wtf/unicode/icu/CollatorICU.cpp b/sky/engine/wtf/unicode/icu/CollatorICU.cpp
index a21e9325a5add6c86844373e4bb8b07ca1e06ffb..c667a639b32d633ee71975c7192cefc0676dad8e 100644
--- a/sky/engine/wtf/unicode/icu/CollatorICU.cpp
+++ b/sky/engine/wtf/unicode/icu/CollatorICU.cpp
@@ -37,11 +37,6 @@
#include <string.h>
#include <unicode/ucol.h>
-#if OS(MACOSX)
-#include "wtf/RetainPtr.h"
-#include <CoreFoundation/CoreFoundation.h>
-#endif
-
namespace WTF {
static UCollator* cachedCollator;
@@ -60,18 +55,7 @@ Collator::Collator(const char* locale)
PassOwnPtr<Collator> Collator::userDefault()
{
-#if OS(MACOSX) && USE(CF)
- // Mac OS X doesn't set UNIX locale to match user-selected one, so ICU default doesn't work.
- RetainPtr<CFLocaleRef> currentLocale(AdoptCF, CFLocaleCopyCurrent());
- CFStringRef collationOrder = (CFStringRef)CFLocaleGetValue(currentLocale.get(), kCFLocaleCollatorIdentifier);
- char buf[256];
- if (!collationOrder)
- return adoptPtr(new Collator(""));
- CFStringGetCString(collationOrder, buf, sizeof(buf), kCFStringEncodingASCII);
- return adoptPtr(new Collator(buf));
-#else
return adoptPtr(new Collator(0));
-#endif
}
Collator::~Collator()
« sky/engine/wtf/StringExtras.h ('K') | « sky/engine/wtf/text/ASCIIFastPath.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698