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

Unified Diff: third_party/WebKit/Source/core/fetch/MockFetchContext.h

Issue 2550373005: Make WebTaskRunner ThreadSafeRefCounted (Closed)
Patch Set: mac fix Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/fetch/MockFetchContext.h
diff --git a/third_party/WebKit/Source/core/fetch/MockFetchContext.h b/third_party/WebKit/Source/core/fetch/MockFetchContext.h
index 3073307a97dd1514d542e8b6a636d70fab5d541b..5b2bba982bf4980342675dcd8a2d4313e8e473ea 100644
--- a/third_party/WebKit/Source/core/fetch/MockFetchContext.h
+++ b/third_party/WebKit/Source/core/fetch/MockFetchContext.h
@@ -49,7 +49,7 @@ class MockFetchContext : public FetchContext {
bool shouldLoadNewResource(Resource::Type) const override {
return m_loadPolicy == kShouldLoadNewResource;
}
- WebTaskRunner* loadingTaskRunner() const override { return m_runner.get(); }
+ RefPtr<WebTaskRunner> loadingTaskRunner() const override { return m_runner; }
void setCachePolicy(CachePolicy policy) { m_policy = policy; }
CachePolicy getCachePolicy() const override { return m_policy; }
@@ -66,13 +66,13 @@ class MockFetchContext : public FetchContext {
MockFetchContext(LoadPolicy loadPolicy)
: m_loadPolicy(loadPolicy),
m_policy(CachePolicyVerify),
- m_runner(wrapUnique(new scheduler::FakeWebTaskRunner)),
+ m_runner(adoptRef(new scheduler::FakeWebTaskRunner)),
m_complete(false),
m_transferSize(-1) {}
enum LoadPolicy m_loadPolicy;
CachePolicy m_policy;
- std::unique_ptr<scheduler::FakeWebTaskRunner> m_runner;
+ RefPtr<scheduler::FakeWebTaskRunner> m_runner;
bool m_complete;
long long m_transferSize;
};

Powered by Google App Engine
This is Rietveld 408576698