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

Side by Side Diff: third_party/WebKit/Source/platform/LifecycleNotifier.h

Issue 2696183002: Migrate WTF::HashSet::remove() to ::erase() [part 1] (Closed)
Patch Set: one more platform-specific reference Created 3 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2013 Google Inc. All Rights Reserved. 3 * Copyright (C) 2013 Google Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 150
151 template <typename T, typename Observer> 151 template <typename T, typename Observer>
152 inline void LifecycleNotifier<T, Observer>::removeObserver(Observer* observer) { 152 inline void LifecycleNotifier<T, Observer>::removeObserver(Observer* observer) {
153 // If immediate removal isn't currently allowed, 153 // If immediate removal isn't currently allowed,
154 // |observer| is recorded for pending removal. 154 // |observer| is recorded for pending removal.
155 if (m_iterationState & AllowPendingRemoval) { 155 if (m_iterationState & AllowPendingRemoval) {
156 m_observers.insert(observer); 156 m_observers.insert(observer);
157 return; 157 return;
158 } 158 }
159 RELEASE_ASSERT(m_iterationState & AllowingRemoval); 159 RELEASE_ASSERT(m_iterationState & AllowingRemoval);
160 m_observers.remove(observer); 160 m_observers.erase(observer);
161 } 161 }
162 162
163 } // namespace blink 163 } // namespace blink
164 164
165 #endif // LifecycleNotifier_h 165 #endif // LifecycleNotifier_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webusb/USB.cpp ('k') | third_party/WebKit/Source/platform/MemoryCoordinator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698