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

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

Issue 10386127: Use TaskRunner WorkerPool for ServerBoundCertService in TestURLRequestContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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 | « no previous file | tools/heapcheck/suppressions.txt » ('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/message_loop_proxy.h"
11 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
11 #include "base/threading/worker_pool.h"
12 #include "net/base/cert_verifier.h" 12 #include "net/base/cert_verifier.h"
13 #include "net/base/default_server_bound_cert_store.h" 13 #include "net/base/default_server_bound_cert_store.h"
14 #include "net/base/host_port_pair.h" 14 #include "net/base/host_port_pair.h"
15 #include "net/base/server_bound_cert_service.h" 15 #include "net/base/server_bound_cert_service.h"
16 #include "net/http/http_network_session.h" 16 #include "net/http/http_network_session.h"
17 #include "net/http/http_server_properties_impl.h" 17 #include "net/http/http_server_properties_impl.h"
18 #include "net/url_request/url_request_job_factory.h" 18 #include "net/url_request/url_request_job_factory.h"
19 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
20 20
21 namespace { 21 namespace {
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 net::HttpCache::DefaultBackend::InMemory(0))); 143 net::HttpCache::DefaultBackend::InMemory(0)));
144 } 144 }
145 // In-memory cookie store. 145 // In-memory cookie store.
146 if (!cookie_store()) 146 if (!cookie_store())
147 context_storage_.set_cookie_store(new net::CookieMonster(NULL, NULL)); 147 context_storage_.set_cookie_store(new net::CookieMonster(NULL, NULL));
148 // In-memory origin bound cert service. 148 // In-memory origin bound cert service.
149 if (!server_bound_cert_service()) { 149 if (!server_bound_cert_service()) {
150 context_storage_.set_server_bound_cert_service( 150 context_storage_.set_server_bound_cert_service(
151 new net::ServerBoundCertService( 151 new net::ServerBoundCertService(
152 new net::DefaultServerBoundCertStore(NULL), 152 new net::DefaultServerBoundCertStore(NULL),
153 base::MessageLoopProxy::current())); 153 base::WorkerPool::GetTaskRunner(true)));
154 } 154 }
155 if (accept_language().empty()) 155 if (accept_language().empty())
156 set_accept_language("en-us,fr"); 156 set_accept_language("en-us,fr");
157 if (accept_charset().empty()) 157 if (accept_charset().empty())
158 set_accept_charset("iso-8859-1,*,utf-8"); 158 set_accept_charset("iso-8859-1,*,utf-8");
159 if (!job_factory()) 159 if (!job_factory())
160 context_storage_.set_job_factory(new net::URLRequestJobFactory); 160 context_storage_.set_job_factory(new net::URLRequestJobFactory);
161 } 161 }
162 162
163 163
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 547
548 ScopedCustomUrlRequestTestHttpHost::~ScopedCustomUrlRequestTestHttpHost() { 548 ScopedCustomUrlRequestTestHttpHost::~ScopedCustomUrlRequestTestHttpHost() {
549 DCHECK_EQ(value_, new_value_); 549 DCHECK_EQ(value_, new_value_);
550 value_ = old_value_; 550 value_ = old_value_;
551 } 551 }
552 552
553 // static 553 // static
554 const std::string& ScopedCustomUrlRequestTestHttpHost::value() { 554 const std::string& ScopedCustomUrlRequestTestHttpHost::value() {
555 return value_; 555 return value_;
556 } 556 }
OLDNEW
« no previous file with comments | « no previous file | tools/heapcheck/suppressions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698