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

Side by Side Diff: trunk/src/net/url_request/url_request_test_util.cc

Issue 12605011: Revert 188912 "Removed static factories for data, ftp, file, and..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 9 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
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 #include "net/url_request/url_request_test_util.h" 5 #include "net/url_request/url_request_test_util.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 DCHECK(!initialized_); 65 DCHECK(!initialized_);
66 initialized_ = true; 66 initialized_ = true;
67 67
68 if (!host_resolver()) 68 if (!host_resolver())
69 context_storage_.set_host_resolver( 69 context_storage_.set_host_resolver(
70 scoped_ptr<HostResolver>(new MockCachingHostResolver())); 70 scoped_ptr<HostResolver>(new MockCachingHostResolver()));
71 if (!proxy_service()) 71 if (!proxy_service())
72 context_storage_.set_proxy_service(ProxyService::CreateDirect()); 72 context_storage_.set_proxy_service(ProxyService::CreateDirect());
73 if (!cert_verifier()) 73 if (!cert_verifier())
74 context_storage_.set_cert_verifier(CertVerifier::CreateDefault()); 74 context_storage_.set_cert_verifier(CertVerifier::CreateDefault());
75 if (!ftp_transaction_factory()) {
76 #if !defined(DISABLE_FTP_SUPPORT)
77 context_storage_.set_ftp_transaction_factory(
78 new FtpNetworkLayer(host_resolver()));
79 #else
80 context_storage_.set_ftp_transaction_factory(NULL);
81 #endif // !defined(DISABLE_FTP_SUPPORT)
82 }
75 if (!ssl_config_service()) 83 if (!ssl_config_service())
76 context_storage_.set_ssl_config_service(new SSLConfigServiceDefaults); 84 context_storage_.set_ssl_config_service(new SSLConfigServiceDefaults);
77 if (!http_auth_handler_factory()) { 85 if (!http_auth_handler_factory()) {
78 context_storage_.set_http_auth_handler_factory( 86 context_storage_.set_http_auth_handler_factory(
79 HttpAuthHandlerFactory::CreateDefault(host_resolver())); 87 HttpAuthHandlerFactory::CreateDefault(host_resolver()));
80 } 88 }
81 if (!http_server_properties()) { 89 if (!http_server_properties()) {
82 context_storage_.set_http_server_properties( 90 context_storage_.set_http_server_properties(
83 new HttpServerPropertiesImpl); 91 new HttpServerPropertiesImpl);
84 } 92 }
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 URLRequestJob* job = main_intercept_job_; 592 URLRequestJob* job = main_intercept_job_;
585 main_intercept_job_ = NULL; 593 main_intercept_job_ = NULL;
586 return job; 594 return job;
587 } 595 }
588 596
589 void TestJobInterceptor::set_main_intercept_job(URLRequestJob* job) { 597 void TestJobInterceptor::set_main_intercept_job(URLRequestJob* job) {
590 main_intercept_job_ = job; 598 main_intercept_job_ = job;
591 } 599 }
592 600
593 } // namespace net 601 } // namespace net
OLDNEW
« no previous file with comments | « trunk/src/net/url_request/url_request_job_manager.cc ('k') | trunk/src/net/url_request/url_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698