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

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

Issue 2550373005: Make WebTaskRunner ThreadSafeRefCounted (Closed)
Patch Set: +DISALLOW_COPY_AND_ASSIGN for win build fix Created 3 years, 11 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 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 b90c0fd9b1ebfb02408cd97e831accaf3d669466..01e52d09c56ea6ad670f9aa6ccaa1a3390088bf8 100644
--- a/third_party/WebKit/Source/core/fetch/MockFetchContext.h
+++ b/third_party/WebKit/Source/core/fetch/MockFetchContext.h
@@ -50,7 +50,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; }
@@ -67,13 +67,13 @@ class MockFetchContext : public FetchContext {
MockFetchContext(LoadPolicy loadPolicy)
: m_loadPolicy(loadPolicy),
m_policy(CachePolicyVerify),
- m_runner(WTF::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;
};
« no previous file with comments | « third_party/WebKit/Source/core/fetch/FetchContext.h ('k') | third_party/WebKit/Source/core/fetch/ResourceLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698