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

Unified Diff: source/i18n/tznames.cpp

Issue 845603002: Update ICU to 54.1 step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: remove unusued directories Created 5 years, 11 months 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
« no previous file with comments | « source/i18n/tzfmt.cpp ('k') | source/i18n/tznames_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/i18n/tznames.cpp
diff --git a/source/i18n/tznames.cpp b/source/i18n/tznames.cpp
index bb1e863cd8bb849a34a3dc78e1a6bcb5a01c559b..57bda37fc666326953df2925b05a8d559e8a68fa 100644
--- a/source/i18n/tznames.cpp
+++ b/source/i18n/tznames.cpp
@@ -1,6 +1,6 @@
/*
*******************************************************************************
-* Copyright (C) 2011-2013, International Business Machines Corporation and *
+* Copyright (C) 2011-2014, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@@ -291,8 +291,29 @@ TimeZoneNames::~TimeZoneNames() {
TimeZoneNames*
TimeZoneNames::createInstance(const Locale& locale, UErrorCode& status) {
- return new TimeZoneNamesDelegate(locale, status);
+ TimeZoneNames *instance = NULL;
+ if (U_SUCCESS(status)) {
+ instance = new TimeZoneNamesDelegate(locale, status);
+ if (instance == NULL && U_SUCCESS(status)) {
+ status = U_MEMORY_ALLOCATION_ERROR;
+ }
+ }
+ return instance;
+}
+
+#ifndef U_HIDE_DRAFT_API
+TimeZoneNames*
+TimeZoneNames::createTZDBInstance(const Locale& locale, UErrorCode& status) {
+ TimeZoneNames *instance = NULL;
+ if (U_SUCCESS(status)) {
+ instance = new TZDBTimeZoneNames(locale);
+ if (instance == NULL && U_SUCCESS(status)) {
+ status = U_MEMORY_ALLOCATION_ERROR;
+ }
+ }
+ return instance;
}
+#endif /* U_HIDE_DRAFT_API */
UnicodeString&
TimeZoneNames::getExemplarLocationName(const UnicodeString& tzID, UnicodeString& name) const {
« no previous file with comments | « source/i18n/tzfmt.cpp ('k') | source/i18n/tznames_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698