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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « source/i18n/tzfmt.cpp ('k') | source/i18n/tznames_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 ******************************************************************************* 2 *******************************************************************************
3 * Copyright (C) 2011-2013, International Business Machines Corporation and * 3 * Copyright (C) 2011-2014, International Business Machines Corporation and *
4 * others. All Rights Reserved. * 4 * others. All Rights Reserved. *
5 ******************************************************************************* 5 *******************************************************************************
6 */ 6 */
7 7
8 #include "unicode/utypes.h" 8 #include "unicode/utypes.h"
9 9
10 #if !UCONFIG_NO_FORMATTING 10 #if !UCONFIG_NO_FORMATTING
11 11
12 #include "unicode/locid.h" 12 #include "unicode/locid.h"
13 #include "unicode/tznames.h" 13 #include "unicode/tznames.h"
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 } 284 }
285 285
286 // --------------------------------------------------- 286 // ---------------------------------------------------
287 // TimeZoneNames base class 287 // TimeZoneNames base class
288 // --------------------------------------------------- 288 // ---------------------------------------------------
289 TimeZoneNames::~TimeZoneNames() { 289 TimeZoneNames::~TimeZoneNames() {
290 } 290 }
291 291
292 TimeZoneNames* 292 TimeZoneNames*
293 TimeZoneNames::createInstance(const Locale& locale, UErrorCode& status) { 293 TimeZoneNames::createInstance(const Locale& locale, UErrorCode& status) {
294 return new TimeZoneNamesDelegate(locale, status); 294 TimeZoneNames *instance = NULL;
295 if (U_SUCCESS(status)) {
296 instance = new TimeZoneNamesDelegate(locale, status);
297 if (instance == NULL && U_SUCCESS(status)) {
298 status = U_MEMORY_ALLOCATION_ERROR;
299 }
300 }
301 return instance;
295 } 302 }
296 303
304 #ifndef U_HIDE_DRAFT_API
305 TimeZoneNames*
306 TimeZoneNames::createTZDBInstance(const Locale& locale, UErrorCode& status) {
307 TimeZoneNames *instance = NULL;
308 if (U_SUCCESS(status)) {
309 instance = new TZDBTimeZoneNames(locale);
310 if (instance == NULL && U_SUCCESS(status)) {
311 status = U_MEMORY_ALLOCATION_ERROR;
312 }
313 }
314 return instance;
315 }
316 #endif /* U_HIDE_DRAFT_API */
317
297 UnicodeString& 318 UnicodeString&
298 TimeZoneNames::getExemplarLocationName(const UnicodeString& tzID, UnicodeString& name) const { 319 TimeZoneNames::getExemplarLocationName(const UnicodeString& tzID, UnicodeString& name) const {
299 return TimeZoneNamesImpl::getDefaultExemplarLocationName(tzID, name); 320 return TimeZoneNamesImpl::getDefaultExemplarLocationName(tzID, name);
300 } 321 }
301 322
302 UnicodeString& 323 UnicodeString&
303 TimeZoneNames::getDisplayName(const UnicodeString& tzID, UTimeZoneNameType type, UDate date, UnicodeString& name) const { 324 TimeZoneNames::getDisplayName(const UnicodeString& tzID, UTimeZoneNameType type, UDate date, UnicodeString& name) const {
304 getTimeZoneDisplayName(tzID, type, name); 325 getTimeZoneDisplayName(tzID, type, name);
305 if (name.isEmpty()) { 326 if (name.isEmpty()) {
306 UnicodeString mzID; 327 UnicodeString mzID;
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 } else if (U_FAILURE(status)) { 467 } else if (U_FAILURE(status)) {
447 delete fMatches; 468 delete fMatches;
448 fMatches = NULL; 469 fMatches = NULL;
449 } 470 }
450 return fMatches; 471 return fMatches;
451 } 472 }
452 473
453 474
454 U_NAMESPACE_END 475 U_NAMESPACE_END
455 #endif 476 #endif
OLDNEW
« 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