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

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

Issue 2191633003: Move ResourceClient to Oilpan heap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@onheap-raw-resource-client
Patch Set: build fix Created 4 years, 3 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/MockResourceClients.h" 5 #include "core/fetch/MockResourceClients.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 {
(...skipping 24 matching lines...) Expand all
35 { 35 {
36 if (m_resource) { 36 if (m_resource) {
37 m_resource->removeClient(this); 37 m_resource->removeClient(this);
38 m_resource = nullptr; 38 m_resource = nullptr;
39 } 39 }
40 } 40 }
41 41
42 DEFINE_TRACE(MockResourceClient) 42 DEFINE_TRACE(MockResourceClient)
43 { 43 {
44 visitor->trace(m_resource); 44 visitor->trace(m_resource);
45 ResourceClient::trace(visitor);
45 } 46 }
46 47
47 MockImageResourceClient::MockImageResourceClient(ImageResource* resource) 48 MockImageResourceClient::MockImageResourceClient(ImageResource* resource)
48 : MockResourceClient(resource) 49 : MockResourceClient(resource)
49 , m_imageChangedCount(0) 50 , m_imageChangedCount(0)
50 , m_imageNotifyFinishedCount(0) 51 , m_imageNotifyFinishedCount(0)
51 { 52 {
52 toImageResource(m_resource.get())->addObserver(this); 53 toImageResource(m_resource.get())->addObserver(this);
53 } 54 }
54 55
(...skipping 24 matching lines...) Expand all
79 } 80 }
80 81
81 bool MockImageResourceClient::notifyFinishedCalled() const 82 bool MockImageResourceClient::notifyFinishedCalled() const
82 { 83 {
83 EXPECT_EQ(m_notifyFinishedCalled ? 1 : 0, m_imageNotifyFinishedCount); 84 EXPECT_EQ(m_notifyFinishedCalled ? 1 : 0, m_imageNotifyFinishedCount);
84 85
85 return m_notifyFinishedCalled; 86 return m_notifyFinishedCalled;
86 } 87 }
87 88
88 } // namespace blink 89 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/MockResourceClients.h ('k') | third_party/WebKit/Source/core/fetch/RawResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698