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

Unified Diff: content/browser/loader/test_url_loader_client.h

Issue 2951293002: NetworkService: Destroy URLLoaders when a NetworkContext is destroyed. (Closed)
Patch Set: Response to comment, change why destruction is safe Created 3 years, 6 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 | « no previous file | content/browser/loader/test_url_loader_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/test_url_loader_client.h
diff --git a/content/browser/loader/test_url_loader_client.h b/content/browser/loader/test_url_loader_client.h
index 3bec4ded060bd83bad1e97731e42130eedaa857c..3e10b7a4245ad6dad9f9217e9557ea25986c4242 100644
--- a/content/browser/loader/test_url_loader_client.h
+++ b/content/browser/loader/test_url_loader_client.h
@@ -91,8 +91,11 @@ class TestURLLoaderClient final : public mojom::URLLoaderClient {
void RunUntilCachedMetadataReceived();
void RunUntilResponseBodyArrived();
void RunUntilComplete();
+ void RunUntilConnectionError();
private:
+ void OnConnectionError();
+
mojo::Binding<mojom::URLLoaderClient> binding_;
ResourceResponseHead response_head_;
base::Optional<net::SSLInfo> ssl_info_;
@@ -106,12 +109,16 @@ class TestURLLoaderClient final : public mojom::URLLoaderClient {
bool has_received_upload_progress_ = false;
bool has_received_cached_metadata_ = false;
bool has_received_completion_ = false;
+ bool has_received_connection_error_ = false;
+
base::Closure quit_closure_for_on_receive_response_;
base::Closure quit_closure_for_on_receive_redirect_;
base::Closure quit_closure_for_on_data_downloaded_;
base::Closure quit_closure_for_on_receive_cached_metadata_;
base::Closure quit_closure_for_on_start_loading_response_body_;
base::Closure quit_closure_for_on_complete_;
+ base::Closure quit_closure_for_on_connection_error_;
+
mojom::URLLoaderFactoryPtr url_loader_factory_;
int64_t download_data_length_ = 0;
int64_t encoded_download_data_length_ = 0;
« no previous file with comments | « no previous file | content/browser/loader/test_url_loader_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698