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

Side by Side Diff: third_party/WebKit/Source/core/page/scrolling/ScrollCustomizationCallbacks.cpp

Issue 2673543003: Migrate WTF::HashMap::remove() to ::erase() (Closed)
Patch Set: 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "core/page/scrolling/ScrollCustomizationCallbacks.h" 5 #include "core/page/scrolling/ScrollCustomizationCallbacks.h"
6 6
7 #include "core/page/scrolling/ScrollStateCallback.h" 7 #include "core/page/scrolling/ScrollStateCallback.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
(...skipping 11 matching lines...) Expand all
22 return it->value.get(); 22 return it->value.get();
23 } 23 }
24 24
25 void ScrollCustomizationCallbacks::setApplyScroll( 25 void ScrollCustomizationCallbacks::setApplyScroll(
26 Element* element, 26 Element* element,
27 ScrollStateCallback* scrollStateCallback) { 27 ScrollStateCallback* scrollStateCallback) {
28 m_applyScrollCallbacks.set(element, scrollStateCallback); 28 m_applyScrollCallbacks.set(element, scrollStateCallback);
29 } 29 }
30 30
31 void ScrollCustomizationCallbacks::removeApplyScroll(Element* element) { 31 void ScrollCustomizationCallbacks::removeApplyScroll(Element* element) {
32 m_applyScrollCallbacks.remove(element); 32 m_applyScrollCallbacks.erase(element);
33 } 33 }
34 34
35 ScrollStateCallback* ScrollCustomizationCallbacks::getApplyScroll( 35 ScrollStateCallback* ScrollCustomizationCallbacks::getApplyScroll(
36 Element* element) { 36 Element* element) {
37 auto it = m_applyScrollCallbacks.find(element); 37 auto it = m_applyScrollCallbacks.find(element);
38 if (it == m_applyScrollCallbacks.end()) 38 if (it == m_applyScrollCallbacks.end())
39 return nullptr; 39 return nullptr;
40 return it->value.get(); 40 return it->value.get();
41 } 41 }
42 42
43 } // namespace blink 43 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698