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

Issue 8919: Adds the ability for ObserverList to not notify observers added during... (Closed)

Created:
12 years, 1 month ago by sky
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Adds the ability for ObserverList to not notify observers added during notification. I need this for bookmarks. If a new observer is added while the bookmark model is in the process of sending out notification the newly added observer gets confused. BUG=674 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=4267

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+67 lines, -5 lines) Patch
M base/observer_list.h View 5 chunks +26 lines, -5 lines 1 comment Download
M base/observer_list_unittest.cc View 2 chunks +40 lines, -0 lines 0 comments Download
M chrome/browser/bookmarks/bookmark_model.cc View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
sky
12 years, 1 month ago (2008-10-30 18:11:18 UTC) #1
darin (slow to review)
I don't think this solution works. What if observers are removed as well as added ...
12 years, 1 month ago (2008-10-30 18:15:13 UTC) #2
darin (slow to review)
> While sending out notifications a remove only nulls out the value, it doesn't shrink ...
12 years, 1 month ago (2008-10-30 19:55:45 UTC) #3
darin (slow to review)
12 years, 1 month ago (2008-10-30 20:12:50 UTC) #4
LGTM

http://codereview.chromium.org/8919/diff/1/2
File base/observer_list.h (right):

http://codereview.chromium.org/8919/diff/1/2#newcode71
Line 71: };
nit: add a newline below here.

Powered by Google App Engine
This is Rietveld 408576698