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

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

Issue 3019007: Add a command line flag to change the default number of parallel DNS requests... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Address jar's comments Created 10 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 | 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 7
8 #include <stdlib.h> 8 #include <stdlib.h>
9 9
10 #include <sstream> 10 #include <sstream>
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 ScopedRunnableMethodFactory<TestCookiePolicy> method_factory_; 124 ScopedRunnableMethodFactory<TestCookiePolicy> method_factory_;
125 int options_; 125 int options_;
126 net::CompletionCallback* callback_; 126 net::CompletionCallback* callback_;
127 }; 127 };
128 128
129 //----------------------------------------------------------------------------- 129 //-----------------------------------------------------------------------------
130 130
131 class TestURLRequestContext : public URLRequestContext { 131 class TestURLRequestContext : public URLRequestContext {
132 public: 132 public:
133 TestURLRequestContext() { 133 TestURLRequestContext() {
134 host_resolver_ = net::CreateSystemHostResolver(); 134 host_resolver_ =
135 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism);
135 proxy_service_ = net::ProxyService::CreateNull(); 136 proxy_service_ = net::ProxyService::CreateNull();
136 Init(); 137 Init();
137 } 138 }
138 139
139 explicit TestURLRequestContext(const std::string& proxy) { 140 explicit TestURLRequestContext(const std::string& proxy) {
140 host_resolver_ = net::CreateSystemHostResolver(); 141 host_resolver_ =
142 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism);
141 net::ProxyConfig proxy_config; 143 net::ProxyConfig proxy_config;
142 proxy_config.proxy_rules().ParseFromString(proxy); 144 proxy_config.proxy_rules().ParseFromString(proxy);
143 proxy_service_ = net::ProxyService::CreateFixed(proxy_config); 145 proxy_service_ = net::ProxyService::CreateFixed(proxy_config);
144 Init(); 146 Init();
145 } 147 }
146 148
147 void set_cookie_policy(net::CookiePolicy* policy) { 149 void set_cookie_policy(net::CookiePolicy* policy) {
148 cookie_policy_ = policy; 150 cookie_policy_ = policy;
149 } 151 }
150 152
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 return false; 764 return false;
763 765
764 return true; 766 return true;
765 } 767 }
766 768
767 private: 769 private:
768 ~FTPTestServer() {} 770 ~FTPTestServer() {}
769 }; 771 };
770 772
771 #endif // NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_ 773 #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