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

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

Issue 9476035: Make CertVerifier a pure virtual interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win shared fix Created 8 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
« no previous file with comments | « net/tools/fetch/fetch_client.cc ('k') | remoting/host/url_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) 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"
11 #include "net/base/cert_verifier.h"
11 #include "net/base/default_origin_bound_cert_store.h" 12 #include "net/base/default_origin_bound_cert_store.h"
12 #include "net/base/host_port_pair.h" 13 #include "net/base/host_port_pair.h"
13 #include "net/base/origin_bound_cert_service.h" 14 #include "net/base/origin_bound_cert_service.h"
14 #include "net/http/http_network_session.h" 15 #include "net/http/http_network_session.h"
15 #include "net/http/http_server_properties_impl.h" 16 #include "net/http/http_server_properties_impl.h"
16 #include "net/url_request/url_request_job_factory.h" 17 #include "net/url_request/url_request_job_factory.h"
17 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
18 19
19 namespace { 20 namespace {
20 21
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 } 105 }
105 106
106 TestURLRequestContext::~TestURLRequestContext() { 107 TestURLRequestContext::~TestURLRequestContext() {
107 DCHECK(initialized_); 108 DCHECK(initialized_);
108 } 109 }
109 110
110 void TestURLRequestContext::Init() { 111 void TestURLRequestContext::Init() {
111 DCHECK(!initialized_); 112 DCHECK(!initialized_);
112 initialized_ = true; 113 initialized_ = true;
113 if (!cert_verifier()) 114 if (!cert_verifier())
114 context_storage_.set_cert_verifier(new net::CertVerifier); 115 context_storage_.set_cert_verifier(net::CertVerifier::CreateDefault());
115 if (!ftp_transaction_factory()) { 116 if (!ftp_transaction_factory()) {
116 context_storage_.set_ftp_transaction_factory( 117 context_storage_.set_ftp_transaction_factory(
117 new net::FtpNetworkLayer(host_resolver())); 118 new net::FtpNetworkLayer(host_resolver()));
118 } 119 }
119 if (!ssl_config_service()) 120 if (!ssl_config_service())
120 context_storage_.set_ssl_config_service(new net::SSLConfigServiceDefaults); 121 context_storage_.set_ssl_config_service(new net::SSLConfigServiceDefaults);
121 if (!http_auth_handler_factory()) { 122 if (!http_auth_handler_factory()) {
122 context_storage_.set_http_auth_handler_factory( 123 context_storage_.set_http_auth_handler_factory(
123 net::HttpAuthHandlerFactory::CreateDefault(host_resolver())); 124 net::HttpAuthHandlerFactory::CreateDefault(host_resolver()));
124 } 125 }
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 537
537 ScopedCustomUrlRequestTestHttpHost::~ScopedCustomUrlRequestTestHttpHost() { 538 ScopedCustomUrlRequestTestHttpHost::~ScopedCustomUrlRequestTestHttpHost() {
538 DCHECK_EQ(value_, new_value_); 539 DCHECK_EQ(value_, new_value_);
539 value_ = old_value_; 540 value_ = old_value_;
540 } 541 }
541 542
542 // static 543 // static
543 const std::string& ScopedCustomUrlRequestTestHttpHost::value() { 544 const std::string& ScopedCustomUrlRequestTestHttpHost::value() {
544 return value_; 545 return value_;
545 } 546 }
OLDNEW
« no previous file with comments | « net/tools/fetch/fetch_client.cc ('k') | remoting/host/url_request_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698