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

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

Issue 862133002: Update from https://crrev.com/312398 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
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/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 params.net_log = net_log(); 110 params.net_log = net_log();
111 context_storage_.set_http_transaction_factory(new HttpCache( 111 context_storage_.set_http_transaction_factory(new HttpCache(
112 new HttpNetworkSession(params), 112 new HttpNetworkSession(params),
113 HttpCache::DefaultBackend::InMemory(0))); 113 HttpCache::DefaultBackend::InMemory(0)));
114 } 114 }
115 // In-memory cookie store. 115 // In-memory cookie store.
116 if (!cookie_store()) 116 if (!cookie_store())
117 context_storage_.set_cookie_store(new CookieMonster(NULL, NULL)); 117 context_storage_.set_cookie_store(new CookieMonster(NULL, NULL));
118 // In-memory Channel ID service. 118 // In-memory Channel ID service.
119 if (!channel_id_service()) { 119 if (!channel_id_service()) {
120 context_storage_.set_channel_id_service( 120 context_storage_.set_channel_id_service(make_scoped_ptr(
121 new ChannelIDService( 121 new ChannelIDService(new DefaultChannelIDStore(NULL),
122 new DefaultChannelIDStore(NULL), 122 base::WorkerPool::GetTaskRunner(true))));
123 base::WorkerPool::GetTaskRunner(true)));
124 } 123 }
125 if (!http_user_agent_settings()) { 124 if (!http_user_agent_settings()) {
126 context_storage_.set_http_user_agent_settings( 125 context_storage_.set_http_user_agent_settings(
127 new StaticHttpUserAgentSettings("en-us,fr", std::string())); 126 new StaticHttpUserAgentSettings("en-us,fr", std::string()));
128 } 127 }
129 if (!job_factory()) 128 if (!job_factory())
130 context_storage_.set_job_factory(new URLRequestJobFactoryImpl); 129 context_storage_.set_job_factory(new URLRequestJobFactoryImpl);
131 } 130 }
132 131
133 TestURLRequestContextGetter::TestURLRequestContextGetter( 132 TestURLRequestContextGetter::TestURLRequestContextGetter(
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 URLRequestJob* job = main_intercept_job_; 639 URLRequestJob* job = main_intercept_job_;
641 main_intercept_job_ = NULL; 640 main_intercept_job_ = NULL;
642 return job; 641 return job;
643 } 642 }
644 643
645 void TestJobInterceptor::set_main_intercept_job(URLRequestJob* job) { 644 void TestJobInterceptor::set_main_intercept_job(URLRequestJob* job) {
646 main_intercept_job_ = job; 645 main_intercept_job_ = job;
647 } 646 }
648 647
649 } // namespace net 648 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698