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

Side by Side Diff: base/i18n/timezone.cc

Issue 1542323002: Switch to standard integer types in base/i18n/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: header Created 5 years 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 | « base/i18n/time_formatting.cc ('k') | base/i18n/utf8_validator_tables.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 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/i18n/timezone.h" 5 #include "base/i18n/timezone.h"
6 6
7 #include <stddef.h>
7 #include <string.h> 8 #include <string.h>
8 9
9 #include <map> 10 #include <map>
10 11
12 #include "base/macros.h"
11 #include "base/memory/singleton.h" 13 #include "base/memory/singleton.h"
12 #include "base/strings/string16.h" 14 #include "base/strings/string16.h"
13 #include "base/strings/utf_string_conversions.h" 15 #include "base/strings/utf_string_conversions.h"
14 #include "third_party/icu/source/i18n/unicode/timezone.h" 16 #include "third_party/icu/source/i18n/unicode/timezone.h"
15 17
16 namespace base { 18 namespace base {
17 19
18 namespace { 20 namespace {
19 21
20 class TimezoneMap { 22 class TimezoneMap {
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 std::string CountryCodeForCurrentTimezone() { 609 std::string CountryCodeForCurrentTimezone() {
608 scoped_ptr<icu::TimeZone> zone(icu::TimeZone::createDefault()); 610 scoped_ptr<icu::TimeZone> zone(icu::TimeZone::createDefault());
609 icu::UnicodeString id; 611 icu::UnicodeString id;
610 zone->getID(id); 612 zone->getID(id);
611 string16 olson_code(id.getBuffer(), id.length()); 613 string16 olson_code(id.getBuffer(), id.length());
612 return TimezoneMap::GetInstance()->CountryCodeForTimezone( 614 return TimezoneMap::GetInstance()->CountryCodeForTimezone(
613 UTF16ToUTF8(olson_code)); 615 UTF16ToUTF8(olson_code));
614 } 616 }
615 617
616 } // namespace base 618 } // namespace base
OLDNEW
« no previous file with comments | « base/i18n/time_formatting.cc ('k') | base/i18n/utf8_validator_tables.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698