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

Issue 7584016: Use MessageLoopProxy instead of MessageLoop to dispatch notifications in ObserverListThreadsafe. (Closed)

Created:
9 years, 4 months ago by adamk
Modified:
9 years, 4 months ago
CC:
chromium-reviews, Paweł Hajdan Jr., brettw-cc_chromium.org
Visibility:
Public.

Description

Use MessageLoopProxy instead of MessageLoop to dispatch notifications in ObserverListThreadsafe. BUG=91589 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=96013

Patch Set 1 #

Patch Set 2 : Remove scoped_ptr dependency #

Total comments: 1

Patch Set 3 : Store MessageLoopProxies in ObserversListMap #

Total comments: 4

Patch Set 4 : Avoid use of std::map::insert #

Patch Set 5 : Further simplification #

Patch Set 6 : Fix try bots: correctly pass along NotificationType #

Patch Set 7 : Add test for last fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+75 lines, -24 lines) Patch
M base/observer_list_threadsafe.h View 1 2 3 4 5 10 chunks +34 lines, -18 lines 0 comments Download
M base/observer_list_unittest.cc View 1 2 3 4 5 6 4 chunks +41 lines, -6 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
adamk
9 years, 4 months ago (2011-08-05 21:58:12 UTC) #1
darin (slow to review)
it seems like a possibly simpler approach would be to continue using MessageLoop::current() as the ...
9 years, 4 months ago (2011-08-08 18:18:26 UTC) #2
adamk
I'd initially gone with my original approach as a "simpler" option, but it looks like ...
9 years, 4 months ago (2011-08-08 19:23:38 UTC) #3
darin (slow to review)
LGTM http://codereview.chromium.org/7584016/diff/5001/base/observer_list_threadsafe.h File base/observer_list_threadsafe.h (right): http://codereview.chromium.org/7584016/diff/5001/base/observer_list_threadsafe.h#newcode99 base/observer_list_threadsafe.h:99: typename ObserversListMap::iterator it = observer_lists_.find(loop); nit: maybe it ...
9 years, 4 months ago (2011-08-08 19:33:21 UTC) #4
adamk
http://codereview.chromium.org/7584016/diff/5001/base/observer_list_threadsafe.h File base/observer_list_threadsafe.h (right): http://codereview.chromium.org/7584016/diff/5001/base/observer_list_threadsafe.h#newcode99 base/observer_list_threadsafe.h:99: typename ObserversListMap::iterator it = observer_lists_.find(loop); On 2011/08/08 19:33:21, darin ...
9 years, 4 months ago (2011-08-08 19:50:03 UTC) #5
darin (slow to review)
LGTM
9 years, 4 months ago (2011-08-08 20:23:59 UTC) #6
adamk
FYI, trybots found a bug in my change (wasn't passing NotificationType down to the child ...
9 years, 4 months ago (2011-08-08 22:21:53 UTC) #7
darin (slow to review)
9 years, 4 months ago (2011-08-08 22:38:41 UTC) #8
LGTM

Powered by Google App Engine
This is Rietveld 408576698