summaryrefslogtreecommitdiffstats
path: root/base/observer_list.h
Commit message (Collapse)AuthorAgeFilesLines
* Revert 88284 - Revert 88151 (see crbug.com/85296) - Fix user-after-free ↵akalin@chromium.org2011-06-091-7/+11
| | | | | | | | | | | | | | | | | error with ObserverList. The problem is that if an ObserverListBase::Iterator is on the stack and one of the observers deletes the object holding the list, Iterator's destructor will use the deleted list. Relanding 88151 now that sync fixes (88483, 88472) are in. BUG=84919 Review URL: http://codereview.chromium.org/7127001 TBR=jam@chromium.org Review URL: http://codereview.chromium.org/7134008 TBR=thakis@chromium.org Review URL: http://codereview.chromium.org/7129036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88484 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 88151 (see crbug.com/85296) - Fix user-after-free error with ↵thakis@chromium.org2011-06-081-11/+7
| | | | | | | | | | | | ObserverList. The problem is that if an ObserverListBase::Iterator is on the stack and one of the observers deletes the object holding the list, Iterator's destructor will use the deleted list. BUG=84919 Review URL: http://codereview.chromium.org/7127001 TBR=jam@chromium.org Review URL: http://codereview.chromium.org/7134008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88284 0039d316-1c4b-4281-b951-d872f2087c98
* Fix user-after-free error with ObserverList. The problem is that if an ↵jam@chromium.org2011-06-071-7/+11
| | | | | | | | | ObserverListBase::Iterator is on the stack and one of the observers deletes the object holding the list, Iterator's destructor will use the deleted list. BUG=84919 Review URL: http://codereview.chromium.org/7127001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88151 0039d316-1c4b-4281-b951-d872f2087c98
* Fix bug in ObserverListThreadsafe::RemoveObserverakalin@chromium.org2011-06-051-5/+9
| | | | | | | | | | | | | | | | | | Like ObserverList, ObserverListThreadSafe::RemoveObserver should do nothing if the observer isn't in the list. Instead, it causes weird bugs if the list has 0 or 1 existing elements. Add comments clarifying semantics of AddObserver/RemoveObserver. Change AddObserver to do nothing in release mode if it tries to add an existing observer. BUG=84922 TEST= Review URL: http://codereview.chromium.org/7024037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87944 0039d316-1c4b-4281-b951-d872f2087c98
* `#pragma once` for app, base, chrome, gfx, ipc, net, skia, viewsthakis@chromium.org2010-07-261-0/+1
| | | | | | | | | BUG=50273 TEST=everything still builds, build is 10% faster on windows, same speed on mac/linux TBR: erg git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53716 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up some Observer code. Original patch by Thiago Farina (see ↵pkasting@chromium.org2010-04-291-5/+3
| | | | | | | | | http://codereview.chromium.org/1725007 ), r=me. BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45963 0039d316-1c4b-4281-b951-d872f2087c98
* Reland 39942 - Switch NetworkChangeNotifier implementations to use ObserverList.willchan@chromium.org2010-02-251-52/+85
| | | | | | | | | Fixed build problem with database_tracker.(cc|h). BUG=36590 Review URL: http://codereview.chromium.org/660039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39983 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 39942 - Switch NetworkChangeNotifier implementations to use ObserverList.willchan@chromium.org2010-02-241-85/+52
| | | | | | | | | | | | | Fix up observer list so we can use FOR_EACH_OBSERVER when check_empty is set. Clean up the ObserverList API a bit, replacing GetElementAt() with HasObserver() and Clear(). BUG=36590 Review URL: http://codereview.chromium.org/652205 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/661029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39945 0039d316-1c4b-4281-b951-d872f2087c98
* Switch NetworkChangeNotifier implementations to use ObserverList.willchan@chromium.org2010-02-241-52/+85
| | | | | | | | | | Fix up observer list so we can use FOR_EACH_OBSERVER when check_empty is set. Clean up the ObserverList API a bit, replacing GetElementAt() with HasObserver() and Clear(). BUG=36590 Review URL: http://codereview.chromium.org/652205 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39942 0039d316-1c4b-4281-b951-d872f2087c98
* NO CODE CHANGEdeanm@chromium.org2009-03-101-1/+0
| | | | | | | | | Normalize end of file newlines in base/. All files end in a single newline. Review URL: http://codereview.chromium.org/42011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11329 0039d316-1c4b-4281-b951-d872f2087c98
* NO CODE CHANGE (except one global std::wstring changed to const wchar_t* ↵maruel@chromium.org2009-03-031-1/+1
| | | | | | | | | | | const per style compliance). Preliminary work to enforce new PRESUBMIT.py rules: - <=80 cols - no trailing whitespaces - svn:eol-style=LF git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10791 0039d316-1c4b-4281-b951-d872f2087c98
* Adds the ability for ObserverList to not notify observers added duringsky@google.com2008-10-311-5/+27
| | | | | | | | | | | | | 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 Review URL: http://codereview.chromium.org/8919 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4267 0039d316-1c4b-4281-b951-d872f2087c98
* This CL adds new UI tests for the SSL UI.jcampan@chromium.org2008-09-241-0/+8
| | | | | | | | | | | | | | | | | | | | Some more info: SSL UI Tests: Added new tests for redirects and frames. Also improved the mixed-content test to exercise the "block mixed-contents" preference and the show info-bar. Automation: For the new UI tests, added methods to tab_proxy and browser_proxy. The ones of most interest are GetLastNavigatinTime and WaitForNavigation that ensures we wait for a navigation to occur or have occured when taking actions that asynchronously trigger navigations. Resource loading: Added a flag to the response we get when loading a resource that indicates whether that resource was filtered (blocked or altered) by the security peer. We use this flag to notify back the browser when we report a load has been committed. This is so the SSL manager knows a frame has been filtered (in which case we have no cert info but should not consider that as unsafe). BUG=2004 Review URL: http://codereview.chromium.org/3165 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2553 0039d316-1c4b-4281-b951-d872f2087c98
* Use a more compact license header in source files.license.bot2008-08-241-28/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
* Fix some compiler warnings, and cleanup EXPECT_EQ comparisons. Hello "U" ↵darin@google.com2008-08-141-2/+2
| | | | | | suffix :-) git-svn-id: svn://svn.chromium.org/chrome/trunk/src@882 0039d316-1c4b-4281-b951-d872f2087c98
* Fix gcc/msvc differencespinkerton@google.com2008-08-041-2/+3
| | | | | | Review URL: http://chrome-reviews.prom.corp.google.com/1104 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@321 0039d316-1c4b-4281-b951-d872f2087c98
* Add base to the repository.initial.commit2008-07-261-0/+170
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8 0039d316-1c4b-4281-b951-d872f2087c98