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

Side by Side Diff: base/observer_list.h

Issue 1538743002: Switch to standard integer types in base/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DEPS roll too Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/numerics/safe_numerics_unittest.cc ('k') | base/observer_list_threadsafe.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_OBSERVER_LIST_H_ 5 #ifndef BASE_OBSERVER_LIST_H_
6 #define BASE_OBSERVER_LIST_H_ 6 #define BASE_OBSERVER_LIST_H_
7 7
8 #include <stddef.h>
9
8 #include <algorithm> 10 #include <algorithm>
9 #include <limits> 11 #include <limits>
10 #include <vector> 12 #include <vector>
11 13
12 #include "base/basictypes.h"
13 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/macros.h"
14 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
15 #include "base/stl_util.h" 17 #include "base/stl_util.h"
16 18
17 /////////////////////////////////////////////////////////////////////////////// 19 ///////////////////////////////////////////////////////////////////////////////
18 // 20 //
19 // OVERVIEW: 21 // OVERVIEW:
20 // 22 //
21 // A container for a list of observers. Unlike a normal STL vector or list, 23 // A container for a list of observers. Unlike a normal STL vector or list,
22 // this container can be modified during iteration without invalidating the 24 // this container can be modified during iteration without invalidating the
23 // iterator. So, it safely handles the case of an observer removing itself 25 // iterator. So, it safely handles the case of an observer removing itself
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 &observer_list); \ 240 &observer_list); \
239 ObserverType* obs; \ 241 ObserverType* obs; \
240 while ((obs = it_inside_observer_macro.GetNext()) != nullptr) \ 242 while ((obs = it_inside_observer_macro.GetNext()) != nullptr) \
241 obs->func; \ 243 obs->func; \
242 } \ 244 } \
243 } while (0) 245 } while (0)
244 246
245 } // namespace base 247 } // namespace base
246 248
247 #endif // BASE_OBSERVER_LIST_H_ 249 #endif // BASE_OBSERVER_LIST_H_
OLDNEW
« no previous file with comments | « base/numerics/safe_numerics_unittest.cc ('k') | base/observer_list_threadsafe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698