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

Issue 2304073003: Mojoify time zone update IPC from browser to renderer (Closed)

Created:
4 years, 3 months ago by blundell
Modified:
4 years, 3 months ago
CC:
Aaron Boodman, abarth-chromium, chromium-reviews, creis+watch_chromium.org, darin (slow to review), darin-cc_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Mojoify time zone update IPC from browser to renderer To start the servicification of //content's time zone monitoring code, this CL Mojoifies the ViewMsg_TimezoneChange message sent from the browser to the renderer. To do so, we introduce the TimeZoneMonitor Mojo interface (living in //device, where the implementation will move to), and change content::TimeZoneMonitor to implement the interface. Rather than notifying all RenderProcessHosts on a time zone change, content::TimeZoneMonitor maintains connections to the clients (RenderThreadImpl in this case) and notifies them directly on a time zone change. This CL uses the polling pattern described here: https://groups.google.com/a/chromium.org/forum/#!topic/mojo-dev/pSNDDN3gpFo for consistency with the way that the geolocation and battery monitor interfaces work (in practice, it's unlikely that time zone change updates would flood the client, of course). Followup will decouple content::TimeZoneMonitor from //content and move it to // device. BUG=612341 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. Committed: https://crrev.com/c00adf442e48581afa7df022a0e84c507d1ff3e3 Cr-Commit-Position: refs/heads/master@{#419140}

Patch Set 1 #

Patch Set 2 : Fix compile #

Patch Set 3 : Fix compile #

Patch Set 4 : Browser-side connection in TimeZoneMonitor, eliminate content IPC #

Patch Set 5 : Close bindings on destruction to avoid DCHECK on hanging callback #

Patch Set 6 : git cl format #

Patch Set 7 : nits #

Total comments: 12

Patch Set 8 : Response to reviews #

Total comments: 1

Patch Set 9 : Switch to push #

Total comments: 4

Patch Set 10 : Response to reviews #

Total comments: 1

Patch Set 11 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+88 lines, -42 lines) Patch
M content/browser/DEPS View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/browser_main_loop.h View 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +11 lines, -4 lines 0 comments Download
M content/browser/time_zone_monitor.h View 1 2 3 4 5 6 7 8 2 chunks +14 lines, -5 lines 0 comments Download
M content/browser/time_zone_monitor.cc View 1 2 3 4 5 6 7 8 3 chunks +15 lines, -8 lines 0 comments Download
M content/browser/time_zone_monitor_android.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M content/browser/time_zone_monitor_chromeos.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M content/browser/time_zone_monitor_linux.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -4 lines 0 comments Download
M content/browser/time_zone_monitor_mac.mm View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M content/browser/time_zone_monitor_win.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M content/common/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M content/common/view_messages.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -4 lines 0 comments Download
M content/public/browser/render_process_host.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -4 lines 0 comments Download
M content/public/test/mock_render_process_host.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -1 line 0 comments Download
M content/public/test/mock_render_process_host.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -3 lines 0 comments Download
M content/renderer/DEPS View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_thread_impl.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +10 lines, -1 line 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +8 lines, -2 lines 0 comments Download
A + device/time_zone_monitor/OWNERS View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
A + device/time_zone_monitor/public/interfaces/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
A + device/time_zone_monitor/public/interfaces/OWNERS View 1 2 3 4 5 6 7 0 chunks +-1 lines, --1 lines 0 comments Download
A device/time_zone_monitor/public/interfaces/time_zone_monitor.mojom View 1 2 3 4 5 6 7 8 1 chunk +17 lines, -0 lines 0 comments Download

Messages

Total messages: 71 (47 generated)
blundell
4 years, 3 months ago (2016-09-06 10:31:59 UTC) #23
blundell
+dcheng@ for security review of the new mojom file and the Chrome IPC removal
4 years, 3 months ago (2016-09-06 10:33:29 UTC) #25
jam
lgtm https://codereview.chromium.org/2304073003/diff/120001/content/browser/time_zone_monitor.h File content/browser/time_zone_monitor.h (right): https://codereview.chromium.org/2304073003/diff/120001/content/browser/time_zone_monitor.h#newcode33 content/browser/time_zone_monitor.h:33: // TODO(blundell): Update this class to be named ...
4 years, 3 months ago (2016-09-06 22:11:18 UTC) #26
dcheng
https://codereview.chromium.org/2304073003/diff/120001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/2304073003/diff/120001/content/browser/renderer_host/render_process_host_impl.cc#newcode1243 content/browser/renderer_host/render_process_host_impl.cc:1243: BrowserMainLoop::GetInstance()->time_zone_monitor()))); With some hand-waving, I can see how the ...
4 years, 3 months ago (2016-09-06 22:20:38 UTC) #27
blundell
Thanks for the reviews! dcheng@: PTAL. rockot@: need a review from you as well. https://codereview.chromium.org/2304073003/diff/120001/content/browser/renderer_host/render_process_host_impl.cc ...
4 years, 3 months ago (2016-09-07 14:40:05 UTC) #32
Ken Rockot(use gerrit already)
LGTM with optional mojom change https://codereview.chromium.org/2304073003/diff/160001/device/time_zone_monitor/public/interfaces/time_zone_monitor.mojom File device/time_zone_monitor/public/interfaces/time_zone_monitor.mojom (right): https://codereview.chromium.org/2304073003/diff/160001/device/time_zone_monitor/public/interfaces/time_zone_monitor.mojom#newcode7 device/time_zone_monitor/public/interfaces/time_zone_monitor.mojom:7: interface TimeZoneMonitor { Optional ...
4 years, 3 months ago (2016-09-07 14:54:40 UTC) #35
blundell
On 2016/09/07 14:54:40, Ken Rockot wrote: > LGTM with optional mojom change > > https://codereview.chromium.org/2304073003/diff/160001/device/time_zone_monitor/public/interfaces/time_zone_monitor.mojom ...
4 years, 3 months ago (2016-09-07 16:33:27 UTC) #38
dcheng
LGTM, though I'd personally prefer to just see the fields re-ordered (Having dependencies on field ...
4 years, 3 months ago (2016-09-07 20:59:28 UTC) #39
blundell
Hey Ken, I put the CL in the push model but as a result time_zone_monitor.cc ...
4 years, 3 months ago (2016-09-12 14:30:33 UTC) #44
Ken Rockot(use gerrit already)
I see. Seems reasonable that we would add something like an InterfacePtrSet for this sort ...
4 years, 3 months ago (2016-09-12 16:30:34 UTC) #45
blundell
On 2016/09/12 16:30:34, Ken Rockot wrote: > I see. Seems reasonable that we would add ...
4 years, 3 months ago (2016-09-13 11:48:36 UTC) #51
blundell
On 2016/09/13 11:48:36, blundell wrote: > On 2016/09/12 16:30:34, Ken Rockot wrote: > > I ...
4 years, 3 months ago (2016-09-13 11:49:18 UTC) #52
blundell
Mark, this CL is preparing the split of time zone monitor code out of //content ...
4 years, 3 months ago (2016-09-13 11:50:39 UTC) #54
Ken Rockot(use gerrit already)
lgtm https://codereview.chromium.org/2304073003/diff/200001/content/renderer/render_thread_impl.cc File content/renderer/render_thread_impl.cc (right): https://codereview.chromium.org/2304073003/diff/200001/content/renderer/render_thread_impl.cc#newcode860 content/renderer/render_thread_impl.cc:860: GetRemoteInterfaces()->GetInterface(mojo::GetProxy(&time_zone_monitor_)); nit: No need for time_zone_monitor_ to be ...
4 years, 3 months ago (2016-09-13 15:27:03 UTC) #55
Mark Mentovai
LGTM https://codereview.chromium.org/2304073003/diff/200001/device/time_zone_monitor/OWNERS File device/time_zone_monitor/OWNERS (right): https://codereview.chromium.org/2304073003/diff/200001/device/time_zone_monitor/OWNERS#newcode1 device/time_zone_monitor/OWNERS:1: mark@chromium.org One-OWNER files aren’t great. Care to add ...
4 years, 3 months ago (2016-09-13 15:33:55 UTC) #56
blundell
Thanks! jam@, dcheng@: ping :). https://codereview.chromium.org/2304073003/diff/200001/content/renderer/render_thread_impl.cc File content/renderer/render_thread_impl.cc (right): https://codereview.chromium.org/2304073003/diff/200001/content/renderer/render_thread_impl.cc#newcode860 content/renderer/render_thread_impl.cc:860: GetRemoteInterfaces()->GetInterface(mojo::GetProxy(&time_zone_monitor_)); On 2016/09/13 15:27:03, ...
4 years, 3 months ago (2016-09-14 09:35:14 UTC) #57
jam
https://codereview.chromium.org/2304073003/diff/220001/device/time_zone_monitor/public/interfaces/time_zone_monitor.mojom File device/time_zone_monitor/public/interfaces/time_zone_monitor.mojom (right): https://codereview.chromium.org/2304073003/diff/220001/device/time_zone_monitor/public/interfaces/time_zone_monitor.mojom#newcode11 device/time_zone_monitor/public/interfaces/time_zone_monitor.mojom:11: AddClient(TimeZoneMonitorClient client); nit: do we really need two interfaces? ...
4 years, 3 months ago (2016-09-15 16:12:11 UTC) #58
jam
lgtm On 2016/09/15 16:12:11, jam wrote: > https://codereview.chromium.org/2304073003/diff/220001/device/time_zone_monitor/public/interfaces/time_zone_monitor.mojom > File device/time_zone_monitor/public/interfaces/time_zone_monitor.mojom (right): > > https://codereview.chromium.org/2304073003/diff/220001/device/time_zone_monitor/public/interfaces/time_zone_monitor.mojom#newcode11 ...
4 years, 3 months ago (2016-09-16 00:19:44 UTC) #59
dcheng
lgtm
4 years, 3 months ago (2016-09-16 04:42:16 UTC) #60
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2304073003/220001
4 years, 3 months ago (2016-09-16 08:13:34 UTC) #63
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/70275) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years, 3 months ago (2016-09-16 08:15:46 UTC) #65
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2304073003/240001
4 years, 3 months ago (2016-09-16 09:55:38 UTC) #68
commit-bot: I haz the power
Committed patchset #11 (id:240001)
4 years, 3 months ago (2016-09-16 10:44:02 UTC) #69
commit-bot: I haz the power
4 years, 3 months ago (2016-09-16 10:45:54 UTC) #71
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/c00adf442e48581afa7df022a0e84c507d1ff3e3
Cr-Commit-Position: refs/heads/master@{#419140}

Powered by Google App Engine
This is Rietveld 408576698