summaryrefslogtreecommitdiffstats
path: root/content/browser/time_zone_monitor_android.cc
Commit message (Collapse)AuthorAgeFilesLines
* Broadcast NotifyTimezoneChange to all RenderProcessHosts when the system timemark@chromium.org2014-04-301-0/+38
zone changes. On Mac, this listens for NSSystemTimeZoneDidChangeNotification notifications. The Mac implementation also contains a sandbox hole to allow time zone information (/etc/localtime and /usr/share/zoneinfo) to be read from within sandboxed renderer processes. On Windows, this listens for WM_TIMECHANGE messages. On Linux (but not Chrome OS or Android), this watches for changes to /etc/localtime, /etc/timezone, and /etc/TZ. There isn't a better standard for watching for time zone changes on Linux. The actual mechanism is libc-specific, but this should work with common libc implementations. Time zone watching is suppressed if the TZ environment variable is set. Linux (including Chrome OS and Android) already contains a sandbox workaround (ProxyLocaltimeCallToBrowser) that allows renderer processes to get time zone information from the browser. On Android, this uses a Java bridge to listen for Intent.ACTION_TIMEZONE_CHANGED. This unifies the existing time zone change notification from Chrome OS with the other platform implementations. On Mac, Linux, Chrome OS, and Android renderers should pick up the new time zone name and UTC offset. On Windows, renderers may only be able to pick up the new UTC offset only, and the sandbox may blocks them from picking up the new time zone name, although in my test on Windows Server 2012, they were able to pick up both the UTC offset and the time zone name upon change. This is a continuation of https://codereview.chromium.org/183763041/ (Mac) and https://codereview.chromium.org/193763002/ (Windows). BUG=288697 TEST=http://crbug.com/288697#c12: load the page, change the system time zone, and then click "recheck" to ensure that the renderer picks up the new time zone. Don't reload the page, which is likely to give you a new renderer process, use the "recheck" link on the page. R=bulach@chromium.org, cpu@chromium.org, jeremy@chromium.org, jln@chromium.org, jochen@chromium.org, pastarmovj@chromium.org, rsesek@chromium.org Review URL: https://codereview.chromium.org/251613002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267226 0039d316-1c4b-4281-b951-d872f2087c98