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

Issue 2231873002: Added budget_service.mojom (Closed)

Created:
4 years, 4 months ago by harkness
Modified:
4 years, 4 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, darin (slow to review), dglazkov+blink, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@budget_api
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Added budget_service.mojom This isn't implemented yet, but will be provide the Mojo service that will provide blink an access point to the BackgroundBudgetService. This also adds a mock and a layout test to check the mojo service. BUG=617971 Committed: https://crrev.com/7e00f5e7b1fdedd2a32ef8321bb13e2f0726bd83 Cr-Commit-Position: refs/heads/master@{#414265}

Patch Set 1 #

Total comments: 4

Patch Set 2 : code review comments #

Total comments: 2

Patch Set 3 : Added comments and converted scriptState passing to be by PassRefPtr #

Total comments: 1

Patch Set 4 : Fixed crash, all tests working #

Total comments: 41

Patch Set 5 : Code review comments - nits and modified scriptStatePassing #

Patch Set 6 : Converted BudgetChunk dictionary to BudgetState interface and other code review updates #

Total comments: 26

Patch Set 7 : Split tests, cleaned up constructor, and nits #

Total comments: 10

Patch Set 8 : test cleanup #

Total comments: 5

Patch Set 9 : Add context safety check, add expected global interface #

Patch Set 10 : Added interface to virtual/stable/webexposed #

Total comments: 2

Patch Set 11 : Guarded BudgetState interface with flag. #

Patch Set 12 : Add a connection error handler to BudgetService #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+298 lines, -22 lines) Patch
A third_party/WebKit/LayoutTests/http/tests/budget/budget-service-mock.js View 1 2 3 4 5 6 1 chunk +42 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/budget/get-budget.html View 1 2 3 4 5 6 7 1 chunk +27 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/budget/get-cost.html View 1 2 3 4 5 6 7 1 chunk +37 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -0 lines 0 comments Download
D third_party/WebKit/Source/modules/budget/BudgetChunk.idl View 1 2 3 4 5 1 chunk +0 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/modules/budget/BudgetService.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +16 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/budget/BudgetService.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +62 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/modules/budget/BudgetService.idl View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
A third_party/WebKit/Source/modules/budget/BudgetState.h View 1 2 3 4 5 6 7 1 chunk +42 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/budget/BudgetState.cpp View 1 2 3 4 5 6 1 chunk +27 lines, -0 lines 0 comments Download
A + third_party/WebKit/Source/modules/budget/BudgetState.idl View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/modules.gypi View 1 2 3 4 5 6 7 8 9 10 3 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/public/BUILD.gn View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/public/blink.gyp View 1 chunk +1 line, -0 lines 0 comments Download
A + third_party/WebKit/public/platform/modules/budget_service/OWNERS View 0 chunks +-1 lines, --1 lines 0 comments Download
A third_party/WebKit/public/platform/modules/budget_service/budget_service.mojom View 1 2 3 4 1 chunk +30 lines, -0 lines 2 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 63 (29 generated)
harkness
4 years, 4 months ago (2016-08-10 16:44:19 UTC) #3
Peter Beverloo
Please reformat the CL's description to be in the "title, description, bug" format (otherwise it'll ...
4 years, 4 months ago (2016-08-10 16:53:31 UTC) #4
harkness
https://codereview.chromium.org/2231873002/diff/1/third_party/WebKit/public/platform/modules/budget_service/budget_service.mojom File third_party/WebKit/public/platform/modules/budget_service/budget_service.mojom (right): https://codereview.chromium.org/2231873002/diff/1/third_party/WebKit/public/platform/modules/budget_service/budget_service.mojom#newcode16 third_party/WebKit/public/platform/modules/budget_service/budget_service.mojom:16: // Time at which the budget is available. On ...
4 years, 4 months ago (2016-08-15 01:06:39 UTC) #7
harkness
https://codereview.chromium.org/2231873002/diff/40001/third_party/WebKit/Source/modules/budget/BudgetService.cpp File third_party/WebKit/Source/modules/budget/BudgetService.cpp (right): https://codereview.chromium.org/2231873002/diff/40001/third_party/WebKit/Source/modules/budget/BudgetService.cpp#newcode54 third_party/WebKit/Source/modules/budget/BudgetService.cpp:54: m_service->GetBudget(origin, convertToBaseCallback(WTF::bind(&BudgetService::asyncGetBudget, wrapPersistent(this), PassRefPtr<ScriptState>(scriptState), wrapPersistent(resolver)))); I converted this from ...
4 years, 4 months ago (2016-08-15 11:21:20 UTC) #8
harkness
4 years, 4 months ago (2016-08-17 12:33:20 UTC) #10
johnme
Looks good, left some nits and questions about things I'm not sure of. https://codereview.chromium.org/2231873002/diff/60001/third_party/WebKit/LayoutTests/http/tests/budget/budget-service-mock.js File ...
4 years, 4 months ago (2016-08-17 13:54:02 UTC) #11
harkness
https://codereview.chromium.org/2231873002/diff/60001/third_party/WebKit/LayoutTests/http/tests/budget/budget-service-mock.js File third_party/WebKit/LayoutTests/http/tests/budget/budget-service-mock.js (right): https://codereview.chromium.org/2231873002/diff/60001/third_party/WebKit/LayoutTests/http/tests/budget/budget-service-mock.js#newcode8 third_party/WebKit/LayoutTests/http/tests/budget/budget-service-mock.js:8: const TEST_BUDGET_VALUE = 2.3; On 2016/08/17 13:54:01, johnme wrote: ...
4 years, 4 months ago (2016-08-18 10:23:26 UTC) #12
johnme
https://codereview.chromium.org/2231873002/diff/60001/third_party/WebKit/LayoutTests/http/tests/budget/budget-service-mock.js File third_party/WebKit/LayoutTests/http/tests/budget/budget-service-mock.js (right): https://codereview.chromium.org/2231873002/diff/60001/third_party/WebKit/LayoutTests/http/tests/budget/budget-service-mock.js#newcode16 third_party/WebKit/LayoutTests/http/tests/budget/budget-service-mock.js:16: let [budget_service, router] = mojo.modules; On 2016/08/18 10:23:26, harkness ...
4 years, 4 months ago (2016-08-18 13:04:31 UTC) #13
harkness
https://codereview.chromium.org/2231873002/diff/60001/third_party/WebKit/LayoutTests/http/tests/budget/budget-service-mock.js File third_party/WebKit/LayoutTests/http/tests/budget/budget-service-mock.js (right): https://codereview.chromium.org/2231873002/diff/60001/third_party/WebKit/LayoutTests/http/tests/budget/budget-service-mock.js#newcode16 third_party/WebKit/LayoutTests/http/tests/budget/budget-service-mock.js:16: let [budget_service, router] = mojo.modules; On 2016/08/18 13:04:31, johnme ...
4 years, 4 months ago (2016-08-22 08:57:47 UTC) #14
johnme
lgtm as long as you get someone with more mojo experience to check the BudgetService ...
4 years, 4 months ago (2016-08-22 13:14:37 UTC) #15
Peter Beverloo
https://codereview.chromium.org/2231873002/diff/100001/third_party/WebKit/LayoutTests/http/tests/budget/budget-service-mock.js File third_party/WebKit/LayoutTests/http/tests/budget/budget-service-mock.js (right): https://codereview.chromium.org/2231873002/diff/100001/third_party/WebKit/LayoutTests/http/tests/budget/budget-service-mock.js#newcode9 third_party/WebKit/LayoutTests/http/tests/budget/budget-service-mock.js:9: const TEST_BUDGET_TIME = new Date().getTime(); One thing to consider: ...
4 years, 4 months ago (2016-08-22 17:57:56 UTC) #16
harkness
https://codereview.chromium.org/2231873002/diff/100001/third_party/WebKit/LayoutTests/http/tests/budget/budget-service-mock.js File third_party/WebKit/LayoutTests/http/tests/budget/budget-service-mock.js (right): https://codereview.chromium.org/2231873002/diff/100001/third_party/WebKit/LayoutTests/http/tests/budget/budget-service-mock.js#newcode9 third_party/WebKit/LayoutTests/http/tests/budget/budget-service-mock.js:9: const TEST_BUDGET_TIME = new Date().getTime(); On 2016/08/22 17:57:55, Peter ...
4 years, 4 months ago (2016-08-23 09:38:19 UTC) #17
Peter Beverloo
+haraken, would you mind taking a look too? lgtm https://codereview.chromium.org/2231873002/diff/120001/third_party/WebKit/LayoutTests/http/tests/budget/get-budget.html File third_party/WebKit/LayoutTests/http/tests/budget/get-budget.html (right): https://codereview.chromium.org/2231873002/diff/120001/third_party/WebKit/LayoutTests/http/tests/budget/get-budget.html#newcode22 third_party/WebKit/LayoutTests/http/tests/budget/get-budget.html:22: ...
4 years, 4 months ago (2016-08-23 09:46:39 UTC) #19
harkness
https://codereview.chromium.org/2231873002/diff/120001/third_party/WebKit/LayoutTests/http/tests/budget/get-budget.html File third_party/WebKit/LayoutTests/http/tests/budget/get-budget.html (right): https://codereview.chromium.org/2231873002/diff/120001/third_party/WebKit/LayoutTests/http/tests/budget/get-budget.html#newcode22 third_party/WebKit/LayoutTests/http/tests/budget/get-budget.html:22: assert_equals(budget[0].time, TEST_BUDGET_TIME); On 2016/08/23 09:46:39, Peter Beverloo wrote: > ...
4 years, 4 months ago (2016-08-23 10:06:17 UTC) #20
haraken
LGTM https://codereview.chromium.org/2231873002/diff/140001/third_party/WebKit/Source/modules/budget/BudgetService.cpp File third_party/WebKit/Source/modules/budget/BudgetService.cpp (right): https://codereview.chromium.org/2231873002/diff/140001/third_party/WebKit/Source/modules/budget/BudgetService.cpp#newcode55 third_party/WebKit/Source/modules/budget/BudgetService.cpp:55: RefPtr<SecurityOrigin> origin(scriptState->getExecutionContext()->getSecurityOrigin()); scriptState->getExecutionContext() may return false if the ...
4 years, 4 months ago (2016-08-23 11:24:12 UTC) #23
haraken
https://codereview.chromium.org/2231873002/diff/140001/third_party/WebKit/Source/modules/budget/BudgetService.cpp File third_party/WebKit/Source/modules/budget/BudgetService.cpp (right): https://codereview.chromium.org/2231873002/diff/140001/third_party/WebKit/Source/modules/budget/BudgetService.cpp#newcode21 third_party/WebKit/Source/modules/budget/BudgetService.cpp:21: Platform::current()->interfaceProvider()->getInterface(mojo::GetProxy(&m_service)); Per discussion on this thread (https://groups.google.com/a/chromium.org/d/topic/chromium-mojo/QpKZPmdWpYY/discussion), it seems ...
4 years, 4 months ago (2016-08-23 15:03:00 UTC) #26
harkness
https://codereview.chromium.org/2231873002/diff/140001/third_party/WebKit/Source/modules/budget/BudgetService.cpp File third_party/WebKit/Source/modules/budget/BudgetService.cpp (right): https://codereview.chromium.org/2231873002/diff/140001/third_party/WebKit/Source/modules/budget/BudgetService.cpp#newcode21 third_party/WebKit/Source/modules/budget/BudgetService.cpp:21: Platform::current()->interfaceProvider()->getInterface(mojo::GetProxy(&m_service)); On 2016/08/23 15:02:59, haraken wrote: > > Per ...
4 years, 4 months ago (2016-08-23 15:10:46 UTC) #27
haraken
https://codereview.chromium.org/2231873002/diff/140001/third_party/WebKit/Source/modules/budget/BudgetService.cpp File third_party/WebKit/Source/modules/budget/BudgetService.cpp (right): https://codereview.chromium.org/2231873002/diff/140001/third_party/WebKit/Source/modules/budget/BudgetService.cpp#newcode21 third_party/WebKit/Source/modules/budget/BudgetService.cpp:21: Platform::current()->interfaceProvider()->getInterface(mojo::GetProxy(&m_service)); On 2016/08/23 15:10:46, harkness wrote: > On 2016/08/23 ...
4 years, 4 months ago (2016-08-23 15:21:35 UTC) #28
harkness
+tsepez Please review this and https://codereview.chromium.org/2265173002/ (adding you as reviewer there also) for Mojo sanity.
4 years, 4 months ago (2016-08-23 16:37:41 UTC) #32
harkness
+dcheng could you take a look at third_party/Webkit/public please?
4 years, 4 months ago (2016-08-23 22:25:57 UTC) #38
dcheng
Sorry, I am at an offsite. I will review Wednesday PST.
4 years, 4 months ago (2016-08-24 04:08:44 UTC) #41
Peter Beverloo
https://codereview.chromium.org/2231873002/diff/180001/third_party/WebKit/Source/modules/budget/BudgetState.idl File third_party/WebKit/Source/modules/budget/BudgetState.idl (right): https://codereview.chromium.org/2231873002/diff/180001/third_party/WebKit/Source/modules/budget/BudgetState.idl#newcode8 third_party/WebKit/Source/modules/budget/BudgetState.idl:8: interface BudgetState { [ RuntimeEnabled=Budget ] interface BudgetState { ...
4 years, 4 months ago (2016-08-24 15:40:57 UTC) #42
harkness
4 years, 4 months ago (2016-08-24 16:10:29 UTC) #43
harkness
https://codereview.chromium.org/2231873002/diff/180001/third_party/WebKit/Source/modules/budget/BudgetState.idl File third_party/WebKit/Source/modules/budget/BudgetState.idl (right): https://codereview.chromium.org/2231873002/diff/180001/third_party/WebKit/Source/modules/budget/BudgetState.idl#newcode8 third_party/WebKit/Source/modules/budget/BudgetState.idl:8: interface BudgetState { On 2016/08/24 15:40:57, Peter Beverloo wrote: ...
4 years, 4 months ago (2016-08-24 16:11:13 UTC) #44
Tom Sepez
Mojom itself LGTM.
4 years, 4 months ago (2016-08-24 20:57:34 UTC) #45
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/2231873002/220001
4 years, 4 months ago (2016-08-24 21:03:45 UTC) #48
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/284091)
4 years, 4 months ago (2016-08-24 22:23:24 UTC) #50
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/2231873002/220001
4 years, 4 months ago (2016-08-24 23:19:48 UTC) #52
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/245444)
4 years, 4 months ago (2016-08-24 23:30:03 UTC) #54
aelias_OOO_until_Jul13
WebKit/public lgtm
4 years, 4 months ago (2016-08-24 23:45:02 UTC) #56
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/2231873002/220001
4 years, 4 months ago (2016-08-25 00:08:47 UTC) #58
dcheng
lgtm https://codereview.chromium.org/2231873002/diff/220001/third_party/WebKit/public/platform/modules/budget_service/budget_service.mojom File third_party/WebKit/public/platform/modules/budget_service/budget_service.mojom (right): https://codereview.chromium.org/2231873002/diff/220001/third_party/WebKit/public/platform/modules/budget_service/budget_service.mojom#newcode10 third_party/WebKit/public/platform/modules/budget_service/budget_service.mojom:10: SILENT_PUSH FWIW, an enum with one value looks ...
4 years, 4 months ago (2016-08-25 00:33:48 UTC) #59
commit-bot: I haz the power
Committed patchset #12 (id:220001)
4 years, 4 months ago (2016-08-25 02:24:47 UTC) #61
commit-bot: I haz the power
4 years, 4 months ago (2016-08-25 02:28:13 UTC) #63
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/7e00f5e7b1fdedd2a32ef8321bb13e2f0726bd83
Cr-Commit-Position: refs/heads/master@{#414265}

Powered by Google App Engine
This is Rietveld 408576698