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

Side by Side Diff: third_party/WebKit/Source/core/fetch/MockImageResourceClient.cpp

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/fetch/MockImageResourceClient.h" 5 #include "core/fetch/MockImageResourceClient.h"
6 6
7 #include "core/fetch/ImageResource.h" 7 #include "core/fetch/ImageResource.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 MockImageResourceClient::MockImageResourceClient(PassRefPtrWillBeRawPtr<Resource > resource) 12 MockImageResourceClient::MockImageResourceClient(RawPtr<Resource> resource)
13 : m_resource(resource.get()) 13 : m_resource(resource.get())
14 , m_imageChangedCount(0) 14 , m_imageChangedCount(0)
15 , m_notifyFinishedCalled(false) 15 , m_notifyFinishedCalled(false)
16 { 16 {
17 m_resource->addClient(this); 17 m_resource->addClient(this);
18 } 18 }
19 19
20 MockImageResourceClient::~MockImageResourceClient() 20 MockImageResourceClient::~MockImageResourceClient()
21 { 21 {
22 if (m_resource) 22 if (m_resource)
23 m_resource->removeClient(this); 23 m_resource->removeClient(this);
24 } 24 }
25 25
26 void MockImageResourceClient::notifyFinished(Resource*) 26 void MockImageResourceClient::notifyFinished(Resource*)
27 { 27 {
28 ASSERT_FALSE(m_notifyFinishedCalled); 28 ASSERT_FALSE(m_notifyFinishedCalled);
29 m_notifyFinishedCalled = true; 29 m_notifyFinishedCalled = true;
30 } 30 }
31 31
32 void MockImageResourceClient::removeAsClient() 32 void MockImageResourceClient::removeAsClient()
33 { 33 {
34 m_resource->removeClient(this); 34 m_resource->removeClient(this);
35 m_resource = nullptr; 35 m_resource = nullptr;
36 } 36 }
37 37
38 } // namespace blink 38 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698