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

Issue 9347056: Fix up SequencedWorkerPool in preparation for making it a TaskRunner (Closed)

Created:
8 years, 10 months ago by akalin
Modified:
8 years, 9 months ago
Reviewers:
michaeln, brettw
CC:
chromium-reviews, brettw-cc_chromium.org
Visibility:
Public.

Description

Fix up SequencedWorkerPool in preparation for making it a TaskRunner Make SequencedWorkerPool ref-counted, merge it with ::Inner, and make its destructor private. Make users hold a scoped_refptr. Fix bug where SequencedWorkerPool::Worker wasn't taking a reference to the worker pool. Rename SequencedWorkerPool::PostTask to PostTaskHelper. Clean up includes and use forward declarations when possible. Make SequencedWorkerPool::Shutdown completely thread-safe by merging the terminating_ and shutdown_called_ flag. (Now that it's ref-counted, it can be passed around multiple threads.) Clean up includes and params in webkit/dom_storage a bit. BUG=114329, 114330 TEST= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=123823

Patch Set 1 #

Patch Set 2 : Fix compile errors #

Patch Set 3 : Address comments #

Total comments: 2

Patch Set 4 : Address dom_storage comments #

Total comments: 1

Patch Set 5 : Address Brett's comments #

Patch Set 6 : Sync to head #

Unified diffs Side-by-side diffs Delta from patch set Stats (+201 lines, -165 lines) Patch
M base/threading/sequenced_worker_pool.h View 1 2 3 4 9 chunks +26 lines, -18 lines 0 comments Download
M base/threading/sequenced_worker_pool.cc View 1 2 3 4 22 chunks +129 lines, -105 lines 0 comments Download
M base/threading/sequenced_worker_pool_unittest.cc View 1 2 13 chunks +38 lines, -37 lines 0 comments Download
M content/browser/browser_thread_impl.cc View 1 2 3 4 5 1 chunk +1 line, -3 lines 0 comments Download
M webkit/dom_storage/dom_storage_area.cc View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M webkit/dom_storage/dom_storage_session.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M webkit/dom_storage/dom_storage_task_runner.h View 1 2 3 4 5 3 chunks +3 lines, -2 lines 0 comments Download
M webkit/dom_storage/dom_storage_task_runner.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
akalin
+brettw for review
8 years, 10 months ago (2012-02-15 22:54:21 UTC) #1
akalin
Fix compile errors in dom_storage, +michaeln for reviewing that
8 years, 10 months ago (2012-02-16 00:12:42 UTC) #2
brettw
Why would the TaskRunner classes need to access the inner object?
8 years, 10 months ago (2012-02-16 01:33:13 UTC) #3
akalin
On 2012/02/16 01:33:13, brettw wrote: > Why would the TaskRunner classes need to access the ...
8 years, 10 months ago (2012-02-16 01:35:15 UTC) #4
brettw
On Wed, Feb 15, 2012 at 5:35 PM, <akalin@chromium.org> wrote: > On 2012/02/16 01:33:13, brettw ...
8 years, 10 months ago (2012-02-16 01:48:07 UTC) #5
akalin
On 2012/02/16 01:48:07, brettw wrote: > On Wed, Feb 15, 2012 at 5:35 PM, <mailto:akalin@chromium.org> ...
8 years, 10 months ago (2012-02-16 01:59:22 UTC) #6
michaeln
+1 what brett said, seems like a simpler solution > have a memory lifetime issue, ...
8 years, 10 months ago (2012-02-17 04:32:19 UTC) #7
brettw
Thanks for noticing the lack of use of the refcounted facility of the inner class. ...
8 years, 10 months ago (2012-02-17 04:46:57 UTC) #8
akalin
On 2012/02/17 04:46:57, brettw wrote: > Thanks for noticing the lack of use of the ...
8 years, 10 months ago (2012-02-17 09:41:24 UTC) #9
brettw
On Fri, Feb 17, 2012 at 1:41 AM, <akalin@chromium.org> wrote: > On 2012/02/17 04:46:57, brettw ...
8 years, 10 months ago (2012-02-17 20:18:14 UTC) #10
akalin
> The inner class solved this problem as well as the dependency problem. > It ...
8 years, 10 months ago (2012-02-18 09:47:43 UTC) #11
brettw
On Sat, Feb 18, 2012 at 1:47 AM, <akalin@chromium.org> wrote: > Actually, can't we take ...
8 years, 10 months ago (2012-02-20 21:28:44 UTC) #12
akalin
> It could implement the basic unordered kind, sure. But the ordered > ones would ...
8 years, 10 months ago (2012-02-22 22:33:10 UTC) #13
michaeln
Thnx for cleaning up the iwyu things. http://codereview.chromium.org/9347056/diff/13001/webkit/dom_storage/dom_storage_task_runner.h File webkit/dom_storage/dom_storage_task_runner.h (right): http://codereview.chromium.org/9347056/diff/13001/webkit/dom_storage/dom_storage_task_runner.h#newcode51 webkit/dom_storage/dom_storage_task_runner.h:51: const scoped_refptr<base::MessageLoopProxy>& ...
8 years, 10 months ago (2012-02-23 03:55:25 UTC) #14
akalin
PTAL. ping, brett? http://codereview.chromium.org/9347056/diff/13001/webkit/dom_storage/dom_storage_task_runner.h File webkit/dom_storage/dom_storage_task_runner.h (right): http://codereview.chromium.org/9347056/diff/13001/webkit/dom_storage/dom_storage_task_runner.h#newcode51 webkit/dom_storage/dom_storage_task_runner.h:51: const scoped_refptr<base::MessageLoopProxy>& delayed_task_loop); On 2012/02/23 03:55:25, ...
8 years, 10 months ago (2012-02-23 22:22:30 UTC) #15
brettw
http://codereview.chromium.org/9347056/diff/21001/base/threading/sequenced_worker_pool.h File base/threading/sequenced_worker_pool.h (right): http://codereview.chromium.org/9347056/diff/21001/base/threading/sequenced_worker_pool.h#newcode22 base/threading/sequenced_worker_pool.h:22: #include "base/synchronization/condition_variable.h" One of the reasons I liked the ...
8 years, 10 months ago (2012-02-24 05:43:34 UTC) #16
michaeln
/dom_storage lgtm brett has a good point about hiding the details (the dependencies) in the ...
8 years, 10 months ago (2012-02-24 19:12:33 UTC) #17
akalin
On 2012/02/24 05:43:34, brettw wrote: > http://codereview.chromium.org/9347056/diff/21001/base/threading/sequenced_worker_pool.h#newcode22 > base/threading/sequenced_worker_pool.h:22: #include > "base/synchronization/condition_variable.h" > One of ...
8 years, 10 months ago (2012-02-24 20:22:18 UTC) #18
brettw
lgtm
8 years, 9 months ago (2012-02-27 17:08:40 UTC) #19
commit-bot: I haz the power
8 years, 9 months ago (2012-02-27 19:32:28 UTC) #20

Powered by Google App Engine
This is Rietveld 408576698