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

Side by Side Diff: net/test/url_request/url_request_failed_job.h

Issue 2069303002: Add new Cronet exception class for QUIC errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: header Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_TEST_URL_REQUEST_URL_REQUEST_FAILED_JOB_H_ 5 #ifndef NET_TEST_URL_REQUEST_URL_REQUEST_FAILED_JOB_H_
6 #define NET_TEST_URL_REQUEST_URL_REQUEST_FAILED_JOB_H_ 6 #define NET_TEST_URL_REQUEST_URL_REQUEST_FAILED_JOB_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 25 matching lines...) Expand all
36 // Same as above, except that the job fails at FailurePhase.START. 36 // Same as above, except that the job fails at FailurePhase.START.
37 URLRequestFailedJob(URLRequest* request, 37 URLRequestFailedJob(URLRequest* request,
38 NetworkDelegate* network_delegate, 38 NetworkDelegate* network_delegate,
39 int net_error); 39 int net_error);
40 40
41 // URLRequestJob implementation: 41 // URLRequestJob implementation:
42 void Start() override; 42 void Start() override;
43 int ReadRawData(IOBuffer* buf, int buf_size) override; 43 int ReadRawData(IOBuffer* buf, int buf_size) override;
44 int GetResponseCode() const override; 44 int GetResponseCode() const override;
45 void GetResponseInfo(HttpResponseInfo* info) override; 45 void GetResponseInfo(HttpResponseInfo* info) override;
46 void PopulateNetErrorDetails(NetErrorDetails* details) const override;
46 47
47 // Adds the testing URLs to the URLRequestFilter. 48 // Adds the testing URLs to the URLRequestFilter.
48 static void AddUrlHandler(); 49 static void AddUrlHandler();
49 static void AddUrlHandlerForHostname(const std::string& hostname); 50 static void AddUrlHandlerForHostname(const std::string& hostname);
50 51
51 // Given a net error code, constructs a mock URL that will return that error 52 // Given a net error code, constructs a mock URL that will return that error
52 // asynchronously when started. |net_error| must be a valid net error code 53 // asynchronously when started. |net_error| must be a valid net error code
53 // other than net::OK. Passing net::ERR_IO_PENDING for |net_error| causes the 54 // other than net::OK. Passing net::ERR_IO_PENDING for |net_error| causes the
54 // resulting request to hang. 55 // resulting request to hang.
55 static GURL GetMockHttpUrl(int net_error); 56 static GURL GetMockHttpUrl(int net_error);
(...skipping 24 matching lines...) Expand all
80 const int net_error_; 81 const int net_error_;
81 82
82 base::WeakPtrFactory<URLRequestFailedJob> weak_factory_; 83 base::WeakPtrFactory<URLRequestFailedJob> weak_factory_;
83 84
84 DISALLOW_COPY_AND_ASSIGN(URLRequestFailedJob); 85 DISALLOW_COPY_AND_ASSIGN(URLRequestFailedJob);
85 }; 86 };
86 87
87 } // namespace net 88 } // namespace net
88 89
89 #endif // NET_TEST_URL_REQUEST_URL_REQUEST_FAILED_JOB_H_ 90 #endif // NET_TEST_URL_REQUEST_URL_REQUEST_FAILED_JOB_H_
OLDNEW
« no previous file with comments | « components/cronet/android/url_request_error.cc ('k') | net/test/url_request/url_request_failed_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698