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

Side by Side Diff: net/url_request/url_request_test_util.h

Issue 2542843006: ResourceLoader: Fix a bunch of double-cancellation/double-error notification cases. (Closed)
Patch Set: Move comment Created 4 years 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_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ 5 #ifndef NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_
6 #define NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ 6 #define NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 10
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 allow_certificate_errors_ = val; 158 allow_certificate_errors_ = val;
159 } 159 }
160 void set_credentials(const AuthCredentials& credentials) { 160 void set_credentials(const AuthCredentials& credentials) {
161 credentials_ = credentials; 161 credentials_ = credentials;
162 } 162 }
163 163
164 // query state 164 // query state
165 const std::string& data_received() const { return data_received_; } 165 const std::string& data_received() const { return data_received_; }
166 int bytes_received() const { return static_cast<int>(data_received_.size()); } 166 int bytes_received() const { return static_cast<int>(data_received_.size()); }
167 int response_started_count() const { return response_started_count_; } 167 int response_started_count() const { return response_started_count_; }
168 int received_bytes_count() const { return received_bytes_count_; }
168 int received_redirect_count() const { return received_redirect_count_; } 169 int received_redirect_count() const { return received_redirect_count_; }
169 bool received_data_before_response() const { 170 bool received_data_before_response() const {
170 return received_data_before_response_; 171 return received_data_before_response_;
171 } 172 }
172 bool request_failed() const { return request_failed_; } 173 bool request_failed() const { return request_failed_; }
173 bool have_certificate_errors() const { return have_certificate_errors_; } 174 bool have_certificate_errors() const { return have_certificate_errors_; }
174 bool certificate_errors_are_fatal() const { 175 bool certificate_errors_are_fatal() const {
175 return certificate_errors_are_fatal_; 176 return certificate_errors_are_fatal_;
176 } 177 }
177 bool auth_required_called() const { return auth_required_; } 178 bool auth_required_called() const { return auth_required_; }
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 NetworkDelegate* network_delegate) const override; 424 NetworkDelegate* network_delegate) const override;
424 void set_main_intercept_job(std::unique_ptr<URLRequestJob> job); 425 void set_main_intercept_job(std::unique_ptr<URLRequestJob> job);
425 426
426 private: 427 private:
427 mutable std::unique_ptr<URLRequestJob> main_intercept_job_; 428 mutable std::unique_ptr<URLRequestJob> main_intercept_job_;
428 }; 429 };
429 430
430 } // namespace net 431 } // namespace net
431 432
432 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ 433 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698