OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/chromeos/system/timezone_settings.h" | 5 #include "chrome/browser/chromeos/system/timezone_settings.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/chromeos/chromeos_version.h" | 10 #include "base/chromeos/chromeos_version.h" |
11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/memory/singleton.h" | 15 #include "base/memory/singleton.h" |
16 #include "base/observer_list.h" | 16 #include "base/observer_list.h" |
17 #include "base/stl_util.h" | 17 #include "base/stl_util.h" |
18 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
19 #include "base/strings/utf_string_conversions.h" | 19 #include "base/strings/utf_string_conversions.h" |
20 #include "content/public/browser/browser_thread.h" | 20 #include "content/public/browser/browser_thread.h" |
21 #include "content/public/browser/render_process_host.h" | 21 #include "content/public/browser/render_process_host.h" |
22 #include "content/public/browser/render_view_host.h" | 22 #include "content/public/browser/render_view_host.h" |
23 #include "content/public/browser/render_widget_host.h" | 23 #include "content/public/browser/render_widget_host.h" |
24 #include "third_party/icu/public/i18n/unicode/timezone.h" | 24 #include "third_party/icu/source/i18n/unicode/timezone.h" |
25 | 25 |
26 using content::BrowserThread; | 26 using content::BrowserThread; |
27 | 27 |
28 namespace { | 28 namespace { |
29 | 29 |
30 // The filepath to the timezone file that symlinks to the actual timezone file. | 30 // The filepath to the timezone file that symlinks to the actual timezone file. |
31 const char kTimezoneSymlink[] = "/var/lib/timezone/localtime"; | 31 const char kTimezoneSymlink[] = "/var/lib/timezone/localtime"; |
32 const char kTimezoneSymlink2[] = "/var/lib/timezone/localtime2"; | 32 const char kTimezoneSymlink2[] = "/var/lib/timezone/localtime2"; |
33 | 33 |
34 // The directory that contains all the timezone files. So for timezone | 34 // The directory that contains all the timezone files. So for timezone |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 | 450 |
451 // static | 451 // static |
452 string16 TimezoneSettings::GetTimezoneID(const icu::TimeZone& timezone) { | 452 string16 TimezoneSettings::GetTimezoneID(const icu::TimeZone& timezone) { |
453 icu::UnicodeString id; | 453 icu::UnicodeString id; |
454 timezone.getID(id); | 454 timezone.getID(id); |
455 return string16(id.getBuffer(), id.length()); | 455 return string16(id.getBuffer(), id.length()); |
456 } | 456 } |
457 | 457 |
458 } // namespace system | 458 } // namespace system |
459 } // namespace chromeos | 459 } // namespace chromeos |
OLD | NEW |