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

Unified Diff: net/http/http_transaction_test_util.h

Issue 2886483002: Adds a new class HttpCache::Writers for multiple cache transactions reading from the network. (Closed)
Patch Set: Fix test class memory leak 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
Index: net/http/http_transaction_test_util.h
diff --git a/net/http/http_transaction_test_util.h b/net/http/http_transaction_test_util.h
index c4cd4c66be5a755979cc387c34f5443636593df3..aea9bc15eac37127709d956b574d845aeac0efcc 100644
--- a/net/http/http_transaction_test_util.h
+++ b/net/http/http_transaction_test_util.h
@@ -241,6 +241,10 @@ class MockNetworkTransaction
CreateHelper* websocket_handshake_stream_create_helper() {
return websocket_handshake_stream_create_helper_;
}
+
+ // Error to return on a future Read call.
+ void SetReadError(int error);
jkarlin 2017/06/28 15:50:11 What calls this? I don't see anything in the CL.
+
RequestPriority priority() const { return priority_; }
const HttpRequestInfo* request() const { return request_; }
@@ -282,6 +286,11 @@ class MockNetworkTransaction
CompletionCallback resume_start_callback_; // used for pause and restart.
+ // Error to be returned from Read. If set it will override all Read logic and
+ // simply return the error code (synchronously/asynchronously based on test
+ // mode).
Randy Smith (Not in Mondays) 2017/06/27 18:49:38 This is part of the interface, not the implementat
shivanisha 2017/06/28 18:02:33 Added the error code in MockTransaction and now it
+ int read_error_;
+
base::WeakPtrFactory<MockNetworkTransaction> weak_factory_;
};

Powered by Google App Engine
This is Rietveld 408576698