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

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

Issue 113043: Fix gconf for the linux proxy config service.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 7 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/proxy/proxy_service.cc ('k') | webkit/tools/test_shell/run_all_tests.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 public: 43 public:
44 TestURLRequestContext() { 44 TestURLRequestContext() {
45 proxy_service_ = net::ProxyService::CreateNull(); 45 proxy_service_ = net::ProxyService::CreateNull();
46 http_transaction_factory_ = 46 http_transaction_factory_ =
47 net::HttpNetworkLayer::CreateFactory(proxy_service_); 47 net::HttpNetworkLayer::CreateFactory(proxy_service_);
48 } 48 }
49 49
50 explicit TestURLRequestContext(const std::string& proxy) { 50 explicit TestURLRequestContext(const std::string& proxy) {
51 net::ProxyConfig proxy_config; 51 net::ProxyConfig proxy_config;
52 proxy_config.proxy_rules.ParseFromString(proxy); 52 proxy_config.proxy_rules.ParseFromString(proxy);
53 proxy_service_ = net::ProxyService::Create(&proxy_config); 53 proxy_service_ = net::ProxyService::CreateFixed(proxy_config);
54 http_transaction_factory_ = 54 http_transaction_factory_ =
55 net::HttpNetworkLayer::CreateFactory(proxy_service_); 55 net::HttpNetworkLayer::CreateFactory(proxy_service_);
56 } 56 }
57 57
58 virtual ~TestURLRequestContext() { 58 virtual ~TestURLRequestContext() {
59 delete http_transaction_factory_; 59 delete http_transaction_factory_;
60 delete proxy_service_; 60 delete proxy_service_;
61 } 61 }
62 }; 62 };
63 63
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 544
545 MessageLoop::current()->Run(); 545 MessageLoop::current()->Run();
546 if (request.is_pending()) 546 if (request.is_pending())
547 return false; 547 return false;
548 548
549 return true; 549 return true;
550 } 550 }
551 }; 551 };
552 552
553 #endif // NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_ 553 #endif // NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_
OLDNEW
« no previous file with comments | « net/proxy/proxy_service.cc ('k') | webkit/tools/test_shell/run_all_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698