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

Issue 2309863002: Plumb reserve method of the BudgetAPI (Closed)

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

Description

Plumb reserve method of the BudgetAPI This CL adds the reserve method to both the budget_api mojo service and to the BudgetService web platform API. This also provides a skeleton implementation of the mojo service in chrome/browser, but the full connection is left for a future CL. There are new LayoutTests and an update to the BudgetService Javascript mock to test the new reserve functionality. This does provide some TODO cleanup, adding a success parameter to mojo operations that could fail due to database errors, adding mappings from strings to mojo values, and updating the LayoutTests to be more dynamic. BUG=617971 Committed: https://crrev.com/df4af8684c8cee4e5b68691c03f62db259c5c07c Cr-Commit-Position: refs/heads/master@{#416905}

Patch Set 1 #

Total comments: 40

Patch Set 2 : Updated with code review comments #

Total comments: 4

Patch Set 3 : Added tests for reserve and nits. #

Patch Set 4 : Removed null check for getExecutionContext call #

Patch Set 5 : Rename BudgetServiceErrorType::NO_ERROR to ::NONE to avoid Windows constant name clash. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+211 lines, -39 lines) Patch
M chrome/browser/budget_service/budget_manager.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/budget_service/budget_service_impl.h View 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/budget_service/budget_service_impl.cc View 1 2 3 4 1 chunk +8 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/budget/budget-service-mock.js View 1 2 3 4 2 chunks +57 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/budget/get-budget.html View 2 chunks +14 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/budget/get-budget-in-service-worker.html View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/budget/get-cost.html View 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/budget/get-cost-fails-in-service-worker.html View 1 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/budget/get-cost-in-service-worker.html View 1 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/budget/interfaces.html View 2 chunks +8 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/http/tests/budget/reserve.html View 1 2 2 chunks +11 lines, -10 lines 0 comments Download
A + third_party/WebKit/LayoutTests/http/tests/budget/reserve-in-service-worker.html View 1 2 2 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/budget/resources/instrumentation-service-worker.js View 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/budget/BudgetService.h View 1 chunk +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/budget/BudgetService.cpp View 1 2 3 4 4 chunks +66 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/modules/budget/BudgetService.idl View 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/public/platform/modules/budget_service/budget_service.mojom View 1 2 3 4 2 chunks +12 lines, -2 lines 0 comments Download

Messages

Total messages: 28 (12 generated)
harkness
4 years, 3 months ago (2016-09-05 16:06:31 UTC) #2
Peter Beverloo
https://codereview.chromium.org/2309863002/diff/1/chrome/browser/budget_service/budget_manager.cc File chrome/browser/budget_service/budget_manager.cc (right): https://codereview.chromium.org/2309863002/diff/1/chrome/browser/budget_service/budget_manager.cc#newcode112 chrome/browser/budget_service/budget_manager.cc:112: // No default case. micro nit: it feels to ...
4 years, 3 months ago (2016-09-05 17:06:17 UTC) #3
haraken
https://codereview.chromium.org/2309863002/diff/1/third_party/WebKit/Source/modules/budget/BudgetService.cpp File third_party/WebKit/Source/modules/budget/BudgetService.cpp (right): https://codereview.chromium.org/2309863002/diff/1/third_party/WebKit/Source/modules/budget/BudgetService.cpp#newcode118 third_party/WebKit/Source/modules/budget/BudgetService.cpp:118: if (!context) Nit: I don't think this should happen.
4 years, 3 months ago (2016-09-06 01:46:44 UTC) #5
harkness
https://codereview.chromium.org/2309863002/diff/1/chrome/browser/budget_service/budget_manager.cc File chrome/browser/budget_service/budget_manager.cc (right): https://codereview.chromium.org/2309863002/diff/1/chrome/browser/budget_service/budget_manager.cc#newcode112 chrome/browser/budget_service/budget_manager.cc:112: // No default case. On 2016/09/05 17:06:16, Peter Beverloo ...
4 years, 3 months ago (2016-09-06 15:45:01 UTC) #6
harkness
+tsepez Could you please take a look at the updated budget_service.mojom?
4 years, 3 months ago (2016-09-06 15:49:01 UTC) #8
Peter Beverloo
https://codereview.chromium.org/2309863002/diff/1/chrome/browser/budget_service/budget_manager.cc File chrome/browser/budget_service/budget_manager.cc (right): https://codereview.chromium.org/2309863002/diff/1/chrome/browser/budget_service/budget_manager.cc#newcode112 chrome/browser/budget_service/budget_manager.cc:112: // No default case. On 2016/09/06 15:45:00, harkness wrote: ...
4 years, 3 months ago (2016-09-06 15:54:10 UTC) #9
harkness
https://codereview.chromium.org/2309863002/diff/1/chrome/browser/budget_service/budget_manager.cc File chrome/browser/budget_service/budget_manager.cc (right): https://codereview.chromium.org/2309863002/diff/1/chrome/browser/budget_service/budget_manager.cc#newcode112 chrome/browser/budget_service/budget_manager.cc:112: // No default case. On 2016/09/06 15:54:10, Peter Beverloo ...
4 years, 3 months ago (2016-09-06 16:17:26 UTC) #10
Tom Sepez
mojom LGTM
4 years, 3 months ago (2016-09-06 17:58:46 UTC) #11
Peter Beverloo
lgtm
4 years, 3 months ago (2016-09-06 18:02:22 UTC) #13
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/2309863002/40001
4 years, 3 months ago (2016-09-06 18:03:03 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/252203)
4 years, 3 months ago (2016-09-06 18:40:52 UTC) #16
haraken
https://codereview.chromium.org/2309863002/diff/1/third_party/WebKit/Source/modules/budget/BudgetService.cpp File third_party/WebKit/Source/modules/budget/BudgetService.cpp (right): https://codereview.chromium.org/2309863002/diff/1/third_party/WebKit/Source/modules/budget/BudgetService.cpp#newcode118 third_party/WebKit/Source/modules/budget/BudgetService.cpp:118: if (!context) On 2016/09/06 15:45:01, harkness wrote: > On ...
4 years, 3 months ago (2016-09-07 01:55:47 UTC) #17
harkness
https://codereview.chromium.org/2309863002/diff/1/third_party/WebKit/Source/modules/budget/BudgetService.cpp File third_party/WebKit/Source/modules/budget/BudgetService.cpp (right): https://codereview.chromium.org/2309863002/diff/1/third_party/WebKit/Source/modules/budget/BudgetService.cpp#newcode118 third_party/WebKit/Source/modules/budget/BudgetService.cpp:118: if (!context) On 2016/09/07 01:55:47, haraken wrote: > On ...
4 years, 3 months ago (2016-09-07 09:24:52 UTC) #18
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/2309863002/80001
4 years, 3 months ago (2016-09-07 11:02:51 UTC) #25
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 3 months ago (2016-09-07 11:07:07 UTC) #26
commit-bot: I haz the power
4 years, 3 months ago (2016-09-07 11:09:10 UTC) #28
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/df4af8684c8cee4e5b68691c03f62db259c5c07c
Cr-Commit-Position: refs/heads/master@{#416905}

Powered by Google App Engine
This is Rietveld 408576698