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

Unified Diff: net/base/layered_network_delegate_unittest.cc

Issue 2262653003: Make URLRequest::Read to return net errors or bytes read instead of a bool (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 3 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/base/layered_network_delegate_unittest.cc
diff --git a/net/base/layered_network_delegate_unittest.cc b/net/base/layered_network_delegate_unittest.cc
index 40add36436d8bfb673230b1466058dec3cf7e205..f1d07bc47ac8cc2b5355d2f0165577b93eba85c2 100644
--- a/net/base/layered_network_delegate_unittest.cc
+++ b/net/base/layered_network_delegate_unittest.cc
@@ -80,7 +80,7 @@ class TestNetworkDelegateImpl : public NetworkDelegateImpl {
IncrementAndCompareCounter("on_before_redirect_count");
}
- void OnResponseStarted(URLRequest* request) override {
+ void OnResponseStarted(URLRequest* request, int net_error) override {
IncrementAndCompareCounter("on_response_started_count");
}
@@ -93,7 +93,7 @@ class TestNetworkDelegateImpl : public NetworkDelegateImpl {
IncrementAndCompareCounter("on_network_bytes_sent_count");
}
- void OnCompleted(URLRequest* request, bool started) override {
+ void OnCompleted(URLRequest* request, bool started, int net_error) override {
IncrementAndCompareCounter("on_completed_count");
}
@@ -194,9 +194,9 @@ class TestLayeredNetworkDelegate : public LayeredNetworkDelegate {
OnNetworkBytesSent(request.get(), 42);
EXPECT_EQ(OK, OnHeadersReceived(NULL, completion_callback.callback(),
response_headers.get(), NULL, NULL));
- OnResponseStarted(request.get());
+ OnResponseStarted(request.get(), net::OK);
OnNetworkBytesReceived(request.get(), 42);
- OnCompleted(request.get(), false);
+ OnCompleted(request.get(), false, net::OK);
OnURLRequestDestroyed(request.get());
OnPACScriptError(0, base::string16());
EXPECT_EQ(

Powered by Google App Engine
This is Rietveld 408576698