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

Unified Diff: content/browser/loader/test_resource_handler.cc

Issue 2623383004: Update InterceptingResourceHandler tests to use MockResourceLoader. (Closed)
Patch Set: Response to comments 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
« no previous file with comments | « content/browser/loader/test_resource_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/test_resource_handler.cc
diff --git a/content/browser/loader/test_resource_handler.cc b/content/browser/loader/test_resource_handler.cc
index 86ae04c87e3712c37c0b9037a63e27d9d0ef425e..6cd13a9aa53c076d9f9ac9e0684b9d2e5c9d4ac4 100644
--- a/content/browser/loader/test_resource_handler.cc
+++ b/content/browser/loader/test_resource_handler.cc
@@ -38,7 +38,8 @@ TestResourceHandler::TestResourceHandler(net::URLRequestStatus* request_status,
: ResourceHandler(nullptr),
request_status_ptr_(request_status),
body_ptr_(body),
- deferred_run_loop_(new base::RunLoop()) {
+ deferred_run_loop_(new base::RunLoop()),
+ weak_ptr_factory_(this) {
SetBufferSize(2048);
}
@@ -230,4 +231,8 @@ void TestResourceHandler::WaitUntilResponseComplete() {
response_complete_run_loop_.Run();
}
+base::WeakPtr<TestResourceHandler> TestResourceHandler::GetWeakPtr() {
+ return weak_ptr_factory_.GetWeakPtr();
+}
+
} // namespace content
« no previous file with comments | « content/browser/loader/test_resource_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698