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

Issue 2762573003: Implement BackgroundFetchManager.fetch() and struct traits (Closed)

Created:
3 years, 9 months ago by Peter Beverloo
Modified:
3 years, 9 months ago
CC:
chromium-reviews, awdf+watch_chromium.org, Aaron Boodman, viettrungluu+watch_chromium.org, jam, yzshen+watch_chromium.org, abarth-chromium, blink-reviews, dglazkov+blink, darin-cc_chromium.org, darin (slow to review), harkness+watch_chromium.org, blink-reviews-api_chromium.org, qsr+mojo_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement BackgroundFetchManager.fetch() and struct traits This implements the BackgroundFetchManager.fetch() method and sends it to the browser process over IPC. Struct traits have been added for three C++ types that are analogous to the Web exposed types: - BackgroundFetchOptions The options provided by the developer when starting the fetch. - BackgroundFetchRegistration The data associated with an in-progress background fetch. - IconDefinition The data associated with an individual icon definition. This will eventually move to a more generalized location. What's still missing in the call is the sequence of Request objects. BUG=692534, 692535 Review-Url: https://codereview.chromium.org/2762573003 Cr-Commit-Position: refs/heads/master@{#459412} Committed: https://chromium.googlesource.com/chromium/src/+/a1ab5a9bd84f0a1cf5ebbd322124152bb4cd1323

Patch Set 1 #

Patch Set 2 : Remove something that may've been a comment #

Patch Set 3 : Add a missing file #

Total comments: 16

Patch Set 4 : First round of comments #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+616 lines, -53 lines) Patch
M content/browser/background_fetch/OWNERS View 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/background_fetch/background_fetch_service_impl.h View 1 2 3 3 chunks +6 lines, -0 lines 0 comments Download
M content/browser/background_fetch/background_fetch_service_impl.cc View 1 2 3 3 chunks +22 lines, -1 line 0 comments Download
M content/common/BUILD.gn View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
A content/common/background_fetch/DEPS View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
A content/common/background_fetch/OWNERS View 1 chunk +10 lines, -0 lines 0 comments Download
A content/common/background_fetch/background_fetch_struct_traits.h View 1 1 chunk +82 lines, -0 lines 0 comments Download
A content/common/background_fetch/background_fetch_struct_traits.cc View 1 chunk +47 lines, -0 lines 0 comments Download
A content/common/background_fetch/background_fetch_struct_traits_unittest.cc View 1 2 3 1 chunk +99 lines, -0 lines 0 comments Download
A content/common/background_fetch/background_fetch_types.h View 1 2 3 1 chunk +64 lines, -0 lines 0 comments Download
A content/common/background_fetch/background_fetch_types.cc View 1 chunk +29 lines, -0 lines 0 comments Download
A content/common/background_fetch/background_fetch_types.typemap View 1 chunk +18 lines, -0 lines 0 comments Download
M content/common/typemaps.gni View 1 chunk +1 line, -0 lines 0 comments Download
M content/test/BUILD.gn View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/background_fetch/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/background_fetch/BackgroundFetchBridge.h View 1 2 3 5 chunks +11 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/modules/background_fetch/BackgroundFetchBridge.cpp View 1 2 3 5 chunks +19 lines, -31 lines 0 comments Download
M third_party/WebKit/Source/modules/background_fetch/BackgroundFetchManager.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/background_fetch/BackgroundFetchManager.cpp View 1 2 3 2 chunks +29 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/modules/background_fetch/BackgroundFetchRegistration.h View 1 2 3 1 chunk +5 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/background_fetch/BackgroundFetchRegistration.cpp View 1 2 3 2 chunks +7 lines, -3 lines 2 comments Download
A third_party/WebKit/Source/modules/background_fetch/BackgroundFetchTypeConverters.h View 1 chunk +48 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/background_fetch/BackgroundFetchTypeConverters.cpp View 1 chunk +75 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/background_fetch/OWNERS View 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/public/platform/modules/background_fetch/background_fetch.mojom View 1 2 3 1 chunk +24 lines, -3 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 32 (15 generated)
Peter Beverloo
+harkness for background fetch +dcheng for Mojo (also +tsepez, although this is somewhat Blink-heavy) +avi ...
3 years, 9 months ago (2017-03-20 18:04:44 UTC) #10
Avi (use Gerrit)
lgtm stampity stamp
3 years, 9 months ago (2017-03-20 18:08:42 UTC) #11
dcheng
https://codereview.chromium.org/2762573003/diff/60001/content/browser/background_fetch/background_fetch_service_impl.cc File content/browser/background_fetch/background_fetch_service_impl.cc (right): https://codereview.chromium.org/2762573003/diff/60001/content/browser/background_fetch/background_fetch_service_impl.cc#newcode58 content/browser/background_fetch/background_fetch_service_impl.cc:58: std::move(registration)); FWIW, I believe that BackgroundFetchRegistration is actually non-movable ...
3 years, 9 months ago (2017-03-21 07:03:20 UTC) #14
harkness
lgtm BackgroundFetch https://codereview.chromium.org/2762573003/diff/60001/content/browser/background_fetch/background_fetch_service_impl.cc File content/browser/background_fetch/background_fetch_service_impl.cc (right): https://codereview.chromium.org/2762573003/diff/60001/content/browser/background_fetch/background_fetch_service_impl.cc#newcode12 content/browser/background_fetch/background_fetch_service_impl.cc:12: #include "content/common/service_worker/service_worker_types.h" #include background_fetch_types instead? https://codereview.chromium.org/2762573003/diff/60001/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchBridge.cpp File ...
3 years, 9 months ago (2017-03-21 11:30:00 UTC) #15
Peter Beverloo
Thanks! Let me reply to the Mojo suggestion separately... https://codereview.chromium.org/2762573003/diff/60001/content/browser/background_fetch/background_fetch_service_impl.cc File content/browser/background_fetch/background_fetch_service_impl.cc (right): https://codereview.chromium.org/2762573003/diff/60001/content/browser/background_fetch/background_fetch_service_impl.cc#newcode12 content/browser/background_fetch/background_fetch_service_impl.cc:12: ...
3 years, 9 months ago (2017-03-21 13:46:27 UTC) #16
Peter Beverloo
https://codereview.chromium.org/2762573003/diff/60001/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchBridge.cpp File third_party/WebKit/Source/modules/background_fetch/BackgroundFetchBridge.cpp (right): https://codereview.chromium.org/2762573003/diff/60001/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchBridge.cpp#newcode10 third_party/WebKit/Source/modules/background_fetch/BackgroundFetchBridge.cpp:10: #include "modules/background_fetch/BackgroundFetchTypeConverters.h" On 2017/03/21 07:03:20, dcheng wrote: > Let's ...
3 years, 9 months ago (2017-03-21 14:05:19 UTC) #17
dcheng
On 2017/03/21 14:05:19, Peter Beverloo wrote: > https://codereview.chromium.org/2762573003/diff/60001/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchBridge.cpp > File > third_party/WebKit/Source/modules/background_fetch/BackgroundFetchBridge.cpp > (right): > ...
3 years, 9 months ago (2017-03-22 09:30:38 UTC) #18
Peter Beverloo
On 2017/03/22 09:30:38, dcheng wrote: > On 2017/03/21 14:05:19, Peter Beverloo wrote: > > > ...
3 years, 9 months ago (2017-03-22 14:13:14 UTC) #19
dcheng
On 2017/03/22 14:13:14, Peter Beverloo wrote: > On 2017/03/22 09:30:38, dcheng wrote: > > On ...
3 years, 9 months ago (2017-03-23 07:22:19 UTC) #20
Peter Beverloo
On 2017/03/23 07:22:19, dcheng wrote: > Ah... can we just define the typemap in the ...
3 years, 9 months ago (2017-03-23 19:50:01 UTC) #21
haraken
On 2017/03/23 19:50:01, Peter Beverloo wrote: > On 2017/03/23 07:22:19, dcheng wrote: > > Ah... ...
3 years, 9 months ago (2017-03-24 02:06:42 UTC) #22
dcheng
On 2017/03/23 19:50:01, Peter Beverloo wrote: > On 2017/03/23 07:22:19, dcheng wrote: > > Ah... ...
3 years, 9 months ago (2017-03-24 05:06:02 UTC) #23
Peter Beverloo
On 2017/03/24 05:06:02, dcheng wrote: > On 2017/03/23 19:50:01, Peter Beverloo wrote: > > On ...
3 years, 9 months ago (2017-03-24 12:18:53 UTC) #24
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/2762573003/80001
3 years, 9 months ago (2017-03-24 12:19:11 UTC) #27
commit-bot: I haz the power
Committed patchset #4 (id:80001) as https://chromium.googlesource.com/chromium/src/+/a1ab5a9bd84f0a1cf5ebbd322124152bb4cd1323
3 years, 9 months ago (2017-03-24 14:00:58 UTC) #30
dcheng
(I meant to publish this draft, but I guess I didn't hit the right button.) ...
3 years, 9 months ago (2017-03-24 23:12:24 UTC) #31
Peter Beverloo
3 years, 9 months ago (2017-03-24 23:26:05 UTC) #32
Message was sent while issue was closed.
https://codereview.chromium.org/2762573003/diff/80001/third_party/WebKit/Sour...
File
third_party/WebKit/Source/modules/background_fetch/BackgroundFetchRegistration.cpp
(right):

https://codereview.chromium.org/2762573003/diff/80001/third_party/WebKit/Sour...
third_party/WebKit/Source/modules/background_fetch/BackgroundFetchRegistration.cpp:28:
m_registration = registration;
On 2017/03/24 23:12:24, dcheng wrote:
> Maybe DCHECK(!m_registration) first as well.

Sure, I'll send you a follow-up either tomorrow or after the weekend.

Powered by Google App Engine
This is Rietveld 408576698