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

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

Issue 4208002: Revert 64202 - Initial support for built-in DNS resolver/cache.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « net/tools/fetch/fetch_client.cc ('k') | webkit/tools/test_shell/test_shell_request_context.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_UNITTEST_H_ 5 #ifndef NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_
6 #define NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_ 6 #define NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_
7 #pragma once 7 #pragma once
8 8
9 #include <stdlib.h> 9 #include <stdlib.h>
10 10
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 net::CompletionCallback* callback_; 119 net::CompletionCallback* callback_;
120 }; 120 };
121 121
122 //----------------------------------------------------------------------------- 122 //-----------------------------------------------------------------------------
123 123
124 class TestURLRequestContext : public URLRequestContext { 124 class TestURLRequestContext : public URLRequestContext {
125 public: 125 public:
126 TestURLRequestContext() { 126 TestURLRequestContext() {
127 host_resolver_ = 127 host_resolver_ =
128 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, 128 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism,
129 NULL, NULL); 129 NULL);
130 proxy_service_ = net::ProxyService::CreateDirect(); 130 proxy_service_ = net::ProxyService::CreateDirect();
131 Init(); 131 Init();
132 } 132 }
133 133
134 explicit TestURLRequestContext(const std::string& proxy) { 134 explicit TestURLRequestContext(const std::string& proxy) {
135 host_resolver_ = 135 host_resolver_ =
136 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, 136 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism,
137 NULL, NULL); 137 NULL);
138 net::ProxyConfig proxy_config; 138 net::ProxyConfig proxy_config;
139 proxy_config.proxy_rules().ParseFromString(proxy); 139 proxy_config.proxy_rules().ParseFromString(proxy);
140 proxy_service_ = net::ProxyService::CreateFixed(proxy_config); 140 proxy_service_ = net::ProxyService::CreateFixed(proxy_config);
141 Init(); 141 Init();
142 } 142 }
143 143
144 void set_cookie_policy(net::CookiePolicy* policy) { 144 void set_cookie_policy(net::CookiePolicy* policy) {
145 cookie_policy_ = policy; 145 cookie_policy_ = policy;
146 } 146 }
147 147
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 bool received_data_before_response_; 388 bool received_data_before_response_;
389 bool request_failed_; 389 bool request_failed_;
390 bool have_certificate_errors_; 390 bool have_certificate_errors_;
391 std::string data_received_; 391 std::string data_received_;
392 392
393 // our read buffer 393 // our read buffer
394 scoped_refptr<net::IOBuffer> buf_; 394 scoped_refptr<net::IOBuffer> buf_;
395 }; 395 };
396 396
397 #endif // NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_ 397 #endif // NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_
OLDNEW
« no previous file with comments | « net/tools/fetch/fetch_client.cc ('k') | webkit/tools/test_shell/test_shell_request_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698