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

Issue 1104283002: [Background Sync] Add renderer code to interface between JS API and back-end service (Closed)

Created:
5 years, 8 months ago by iclelland
Modified:
5 years, 7 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, jkarlin+watch_chromium.org, maniscalco+watch_chromium.org, maxbogue+watch_chromium.org, plaree+watch_chromium.org, pvalenzuela+watch_chromium.org, tim+watch_chromium.org, zea+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@bgsync-mojo
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Background Sync] Add renderer code to interface between JS API and back-end service This patch introduces a BackgroundSyncProvider for use by the Blink BackgroundSync module, as well as a proxy object which is used when calling the provider from off of the main thread. The code in BlinkPlatformImpl will dispatch to the appropriate object depending on the running thread. This patch depends on the Mojo service definitions in https://codereview.chromium.org/1106193002 BUG=479251 Committed: https://crrev.com/c9505ef0e59260df2ae80dd8838e55bb0abb4b5d Cr-Commit-Position: refs/heads/master@{#329417}

Patch Set 1 #

Patch Set 2 : Updates based on recent changes to mojo definitions. #

Total comments: 26

Patch Set 3 : Addressing review comments (most) #

Patch Set 4 : Use scoped_ptr for RegisterBackgroundSyncForWorker method #

Patch Set 5 : Add comment re: BackgroundSyncProvider lifetime #

Total comments: 12

Patch Set 6 : Addressing more review comments; restructuring to make threading code clearer #

Patch Set 7 : Make CallbackThreadAdapter own the wrapped callbacks #

Total comments: 2

Patch Set 8 : Move CallbackThreadAdapter template into implementation file #

Total comments: 21

Patch Set 9 : Stricter scoped_ptr usage (plus minor review nits) #

Patch Set 10 : Style / Formatting fixes #

Total comments: 2

Patch Set 11 : Better scoped_ptr construction (nit) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+507 lines, -0 lines) Patch
A content/child/background_sync/background_sync_provider.h View 1 2 3 4 5 6 7 8 9 1 chunk +74 lines, -0 lines 0 comments Download
A content/child/background_sync/background_sync_provider.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +166 lines, -0 lines 0 comments Download
A content/child/background_sync/background_sync_provider_thread_proxy.h View 1 2 3 4 5 6 7 8 9 1 chunk +77 lines, -0 lines 0 comments Download
A content/child/background_sync/background_sync_provider_thread_proxy.cc View 1 2 3 4 5 6 7 8 9 1 chunk +168 lines, -0 lines 0 comments Download
M content/child/blink_platform_impl.h View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -0 lines 0 comments Download
M content/child/blink_platform_impl.cc View 1 2 3 4 5 6 7 8 3 chunks +15 lines, -0 lines 0 comments Download
M content/content_child.gypi View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (4 generated)
iclelland
jkarlin@ - PTAL -- this does not include the actual mojo service, which will be ...
5 years, 7 months ago (2015-04-29 20:06:18 UTC) #2
jkarlin
https://codereview.chromium.org/1104283002/diff/20001/content/child/background_sync/background_sync_provider.cc File content/child/background_sync/background_sync_provider.cc (right): https://codereview.chromium.org/1104283002/diff/20001/content/child/background_sync/background_sync_provider.cc#newcode33 content/child/background_sync/background_sync_provider.cc:33: : service_registry_(service_registry) { DCHECK(service_registry_)? https://codereview.chromium.org/1104283002/diff/20001/content/child/background_sync/background_sync_provider.cc#newcode84 content/child/background_sync/background_sync_provider.cc:84: delete this; This ...
5 years, 7 months ago (2015-05-01 16:13:52 UTC) #3
iclelland
Addressing review comments: Still a scoped_ptr issue to resolve, and some object lifetime comments. https://codereview.chromium.org/1104283002/diff/20001/content/child/background_sync/background_sync_provider.cc ...
5 years, 7 months ago (2015-05-05 14:52:02 UTC) #4
iclelland
+r jochen -- can you take a look? https://codereview.chromium.org/1104283002/diff/20001/content/child/background_sync/background_sync_provider.cc File content/child/background_sync/background_sync_provider.cc (right): https://codereview.chromium.org/1104283002/diff/20001/content/child/background_sync/background_sync_provider.cc#newcode84 content/child/background_sync/background_sync_provider.cc:84: delete ...
5 years, 7 months ago (2015-05-07 06:03:50 UTC) #6
jkarlin
Nice. Just a few more comments. https://codereview.chromium.org/1104283002/diff/80001/content/child/background_sync/background_sync_provider.cc File content/child/background_sync/background_sync_provider.cc (right): https://codereview.chromium.org/1104283002/diff/80001/content/child/background_sync/background_sync_provider.cc#newcode48 content/child/background_sync/background_sync_provider.cc:48: const_cast<blink::WebSyncRegistration*>(options)); You could ...
5 years, 7 months ago (2015-05-07 11:51:53 UTC) #7
jochen (gone - plz use gerrit)
https://codereview.chromium.org/1104283002/diff/80001/content/common/DEPS File content/common/DEPS (right): https://codereview.chromium.org/1104283002/diff/80001/content/common/DEPS#newcode40 content/common/DEPS:40: "+third_party/WebKit/public/platform/modules/background_sync/WebSyncError.h", where is that required?
5 years, 7 months ago (2015-05-07 15:09:52 UTC) #8
iclelland
https://codereview.chromium.org/1104283002/diff/80001/content/child/background_sync/background_sync_provider.cc File content/child/background_sync/background_sync_provider.cc (right): https://codereview.chromium.org/1104283002/diff/80001/content/child/background_sync/background_sync_provider.cc#newcode48 content/child/background_sync/background_sync_provider.cc:48: const_cast<blink::WebSyncRegistration*>(options)); On 2015/05/07 11:51:53, jkarlin wrote: > You could ...
5 years, 7 months ago (2015-05-09 06:41:17 UTC) #9
jkarlin
https://codereview.chromium.org/1104283002/diff/120001/content/child/background_sync/background_sync_provider_thread_proxy.h File content/child/background_sync/background_sync_provider_thread_proxy.h (right): https://codereview.chromium.org/1104283002/diff/120001/content/child/background_sync/background_sync_provider_thread_proxy.h#newcode40 content/child/background_sync/background_sync_provider_thread_proxy.h:40: class CallbackThreadAdapter : public blink::WebCallbacks<S,T> { Cool! Can this ...
5 years, 7 months ago (2015-05-11 11:06:27 UTC) #10
iclelland
5 years, 7 months ago (2015-05-11 18:54:42 UTC) #11
iclelland
(Sorry for the previous blank message; I managed to mail comments before the comments were ...
5 years, 7 months ago (2015-05-11 18:57:01 UTC) #12
jochen (gone - plz use gerrit)
lgtm
5 years, 7 months ago (2015-05-11 23:36:30 UTC) #13
jkarlin
https://codereview.chromium.org/1104283002/diff/140001/content/child/background_sync/background_sync_provider.cc File content/child/background_sync/background_sync_provider.cc (right): https://codereview.chromium.org/1104283002/diff/140001/content/child/background_sync/background_sync_provider.cc#newcode47 content/child/background_sync/background_sync_provider.cc:47: Suggest creating scoped ptrs to options and callbacks at ...
5 years, 7 months ago (2015-05-12 13:19:51 UTC) #14
iclelland
scoped_ptr issues addressed; PTAL. https://codereview.chromium.org/1104283002/diff/140001/content/child/background_sync/background_sync_provider.cc File content/child/background_sync/background_sync_provider.cc (right): https://codereview.chromium.org/1104283002/diff/140001/content/child/background_sync/background_sync_provider.cc#newcode49 content/child/background_sync/background_sync_provider.cc:49: mojo::ConvertTo<SyncRegistrationPtr>(*options), On 2015/05/12 13:19:51, jkarlin ...
5 years, 7 months ago (2015-05-12 14:40:05 UTC) #15
jkarlin
lgtm with nit https://codereview.chromium.org/1104283002/diff/180001/content/child/background_sync/background_sync_provider.cc File content/child/background_sync/background_sync_provider.cc (right): https://codereview.chromium.org/1104283002/diff/180001/content/child/background_sync/background_sync_provider.cc#newcode48 content/child/background_sync/background_sync_provider.cc:48: make_scoped_ptr(options); nit: This can be scoped_ptr<const ...
5 years, 7 months ago (2015-05-12 14:48:33 UTC) #16
iclelland
https://codereview.chromium.org/1104283002/diff/180001/content/child/background_sync/background_sync_provider.cc File content/child/background_sync/background_sync_provider.cc (right): https://codereview.chromium.org/1104283002/diff/180001/content/child/background_sync/background_sync_provider.cc#newcode48 content/child/background_sync/background_sync_provider.cc:48: make_scoped_ptr(options); On 2015/05/12 14:48:33, jkarlin wrote: > nit: This ...
5 years, 7 months ago (2015-05-12 14:59:47 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1104283002/200001
5 years, 7 months ago (2015-05-12 15:33:16 UTC) #20
commit-bot: I haz the power
Committed patchset #11 (id:200001)
5 years, 7 months ago (2015-05-12 16:28:02 UTC) #21
commit-bot: I haz the power
5 years, 7 months ago (2015-05-12 16:28:47 UTC) #22
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/c9505ef0e59260df2ae80dd8838e55bb0abb4b5d
Cr-Commit-Position: refs/heads/master@{#329417}

Powered by Google App Engine
This is Rietveld 408576698