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

Issue 2058523003: Make BackgroundBudgetService calls asynchronous. (Closed)

Created:
4 years, 6 months ago by harkness
Modified:
4 years, 6 months ago
CC:
chromium-reviews, Peter Beverloo, mvanouwerkerk+watch_chromium.org, johnme+watch_chromium.org, harkness+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

This CL converts the GetBudget and StoreBudget calls on the BackgroundBudgetService to be asynchonous. This is a step on the path to converting BackgroundBudgetService budget storage to use a LevelDB storage instead of prefs storage, which will require some of the budget service's methods to run on a thread other than the UI thread. BUG=617971 Committed: https://crrev.com/8e81c750cf56b698d4a1a04bfc2a2ed425d01d41 Cr-Commit-Position: refs/heads/master@{#400707}

Patch Set 1 #

Total comments: 14

Patch Set 2 : Code review comments integrated. #

Total comments: 2

Patch Set 3 : Explicitly use base::RunLoop everywhere. #

Total comments: 10

Patch Set 4 : Simplified test cases, updated nits #

Total comments: 12

Patch Set 5 : More test code cleanup #

Unified diffs Side-by-side diffs Delta from patch set Stats (+115 lines, -69 lines) Patch
M chrome/browser/budget_service/background_budget_service.h View 1 2 3 2 chunks +11 lines, -5 lines 0 comments Download
M chrome/browser/budget_service/background_budget_service.cc View 1 6 chunks +20 lines, -6 lines 0 comments Download
M chrome/browser/budget_service/background_budget_service_unittest.cc View 1 2 3 4 8 chunks +57 lines, -50 lines 0 comments Download
M chrome/browser/push_messaging/push_messaging_notification_manager.h View 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/push_messaging/push_messaging_notification_manager.cc View 2 chunks +20 lines, -8 lines 0 comments Download

Messages

Total messages: 37 (15 generated)
harkness
4 years, 6 months ago (2016-06-10 10:14:01 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2058523003/1
4 years, 6 months ago (2016-06-10 10:15:39 UTC) #4
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/226738)
4 years, 6 months ago (2016-06-10 10:44:56 UTC) #6
Michael van Ouwerkerk
https://codereview.chromium.org/2058523003/diff/1/chrome/browser/budget_service/background_budget_service.cc File chrome/browser/budget_service/background_budget_service.cc (right): https://codereview.chromium.org/2058523003/diff/1/chrome/browser/budget_service/background_budget_service.cc#newcode128 chrome/browser/budget_service/background_budget_service.cc:128: // If there is no stored data or the ...
4 years, 6 months ago (2016-06-10 12:10:19 UTC) #7
harkness
PTAL https://codereview.chromium.org/2058523003/diff/1/chrome/browser/budget_service/background_budget_service.cc File chrome/browser/budget_service/background_budget_service.cc (right): https://codereview.chromium.org/2058523003/diff/1/chrome/browser/budget_service/background_budget_service.cc#newcode128 chrome/browser/budget_service/background_budget_service.cc:128: // If there is no stored data or ...
4 years, 6 months ago (2016-06-10 14:52:57 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2058523003/20001
4 years, 6 months ago (2016-06-10 14:53:37 UTC) #10
Michael van Ouwerkerk
lgtm with nit https://codereview.chromium.org/2058523003/diff/20001/chrome/browser/budget_service/background_budget_service_unittest.cc File chrome/browser/budget_service/background_budget_service_unittest.cc (right): https://codereview.chromium.org/2058523003/diff/20001/chrome/browser/budget_service/background_budget_service_unittest.cc#newcode31 chrome/browser/budget_service/background_budget_service_unittest.cc:31: using base::RunLoop; Peter would probably ask ...
4 years, 6 months ago (2016-06-10 15:04:05 UTC) #11
Michael van Ouwerkerk
Oh and please fix the CL title.
4 years, 6 months ago (2016-06-10 15:05:35 UTC) #12
harkness
https://codereview.chromium.org/2058523003/diff/20001/chrome/browser/budget_service/background_budget_service_unittest.cc File chrome/browser/budget_service/background_budget_service_unittest.cc (right): https://codereview.chromium.org/2058523003/diff/20001/chrome/browser/budget_service/background_budget_service_unittest.cc#newcode31 chrome/browser/budget_service/background_budget_service_unittest.cc:31: using base::RunLoop; On 2016/06/10 15:04:05, Michael van Ouwerkerk wrote: ...
4 years, 6 months ago (2016-06-10 15:19:56 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2058523003/40001
4 years, 6 months ago (2016-06-10 15:20:16 UTC) #17
harkness
johnme@chromium.org: Please review changes in chrome/browser/budget_service I'd forgotten that I only added John and Peter ...
4 years, 6 months ago (2016-06-10 15:21:23 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/198852)
4 years, 6 months ago (2016-06-10 15:26:50 UTC) #21
johnme
lgtm with comments and nits https://codereview.chromium.org/2058523003/diff/40001/chrome/browser/budget_service/background_budget_service.h File chrome/browser/budget_service/background_budget_service.h (right): https://codereview.chromium.org/2058523003/diff/40001/chrome/browser/budget_service/background_budget_service.h#newcode45 chrome/browser/budget_service/background_budget_service.h:45: using GetBudgetCallback = base::Callback<void(double ...
4 years, 6 months ago (2016-06-15 09:59:07 UTC) #22
harkness
https://codereview.chromium.org/2058523003/diff/40001/chrome/browser/budget_service/background_budget_service.h File chrome/browser/budget_service/background_budget_service.h (right): https://codereview.chromium.org/2058523003/diff/40001/chrome/browser/budget_service/background_budget_service.h#newcode45 chrome/browser/budget_service/background_budget_service.h:45: using GetBudgetCallback = base::Callback<void(double /* budget */)>; On 2016/06/15 ...
4 years, 6 months ago (2016-06-20 11:22:19 UTC) #23
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2058523003/60001
4 years, 6 months ago (2016-06-20 11:22:37 UTC) #25
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-20 12:01:32 UTC) #27
johnme
https://codereview.chromium.org/2058523003/diff/60001/chrome/browser/budget_service/background_budget_service_unittest.cc File chrome/browser/budget_service/background_budget_service_unittest.cc (right): https://codereview.chromium.org/2058523003/diff/60001/chrome/browser/budget_service/background_budget_service_unittest.cc#newcode72 chrome/browser/budget_service/background_budget_service_unittest.cc:72: const GURL origin(kTestOrigin); Nit: perhaps simpler to just pass ...
4 years, 6 months ago (2016-06-20 13:35:22 UTC) #28
harkness
https://codereview.chromium.org/2058523003/diff/60001/chrome/browser/budget_service/background_budget_service_unittest.cc File chrome/browser/budget_service/background_budget_service_unittest.cc (right): https://codereview.chromium.org/2058523003/diff/60001/chrome/browser/budget_service/background_budget_service_unittest.cc#newcode72 chrome/browser/budget_service/background_budget_service_unittest.cc:72: const GURL origin(kTestOrigin); On 2016/06/20 13:35:22, johnme wrote: > ...
4 years, 6 months ago (2016-06-20 14:05:08 UTC) #29
johnme
lgtm - test looks much better thanks!
4 years, 6 months ago (2016-06-20 16:18:04 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2058523003/80001
4 years, 6 months ago (2016-06-20 16:26:19 UTC) #33
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 6 months ago (2016-06-20 17:27:37 UTC) #35
commit-bot: I haz the power
4 years, 6 months ago (2016-06-20 17:28:53 UTC) #37
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/8e81c750cf56b698d4a1a04bfc2a2ed425d01d41
Cr-Commit-Position: refs/heads/master@{#400707}

Powered by Google App Engine
This is Rietveld 408576698