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

Side by Side Diff: content/shell/browser/shell_url_request_context_getter.cc

Issue 273193004: Move some content url constants to /url. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/shell/browser/shell_url_request_context_getter.h" 5 #include "content/shell/browser/shell_url_request_context_getter.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 net::HttpCache* main_cache = new net::HttpCache( 200 net::HttpCache* main_cache = new net::HttpCache(
201 network_session_params, main_backend); 201 network_session_params, main_backend);
202 storage_->set_http_transaction_factory(main_cache); 202 storage_->set_http_transaction_factory(main_cache);
203 203
204 scoped_ptr<net::URLRequestJobFactoryImpl> job_factory( 204 scoped_ptr<net::URLRequestJobFactoryImpl> job_factory(
205 new net::URLRequestJobFactoryImpl()); 205 new net::URLRequestJobFactoryImpl());
206 // Keep ProtocolHandlers added in sync with 206 // Keep ProtocolHandlers added in sync with
207 // ShellContentBrowserClient::IsHandledURL(). 207 // ShellContentBrowserClient::IsHandledURL().
208 InstallProtocolHandlers(job_factory.get(), &protocol_handlers_); 208 InstallProtocolHandlers(job_factory.get(), &protocol_handlers_);
209 bool set_protocol = job_factory->SetProtocolHandler( 209 bool set_protocol = job_factory->SetProtocolHandler(
210 kDataScheme, new net::DataProtocolHandler); 210 url::kDataScheme, new net::DataProtocolHandler);
211 DCHECK(set_protocol); 211 DCHECK(set_protocol);
212 set_protocol = job_factory->SetProtocolHandler( 212 set_protocol = job_factory->SetProtocolHandler(
213 kFileScheme, 213 url::kFileScheme,
214 new net::FileProtocolHandler( 214 new net::FileProtocolHandler(
215 content::BrowserThread::GetBlockingPool()-> 215 content::BrowserThread::GetBlockingPool()->
216 GetTaskRunnerWithShutdownBehavior( 216 GetTaskRunnerWithShutdownBehavior(
217 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))); 217 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)));
218 DCHECK(set_protocol); 218 DCHECK(set_protocol);
219 219
220 // Set up interceptors in the reverse order. 220 // Set up interceptors in the reverse order.
221 scoped_ptr<net::URLRequestJobFactory> top_job_factory = 221 scoped_ptr<net::URLRequestJobFactory> top_job_factory =
222 job_factory.PassAs<net::URLRequestJobFactory>(); 222 job_factory.PassAs<net::URLRequestJobFactory>();
223 for (ProtocolHandlerScopedVector::reverse_iterator i = 223 for (ProtocolHandlerScopedVector::reverse_iterator i =
(...skipping 14 matching lines...) Expand all
238 scoped_refptr<base::SingleThreadTaskRunner> 238 scoped_refptr<base::SingleThreadTaskRunner>
239 ShellURLRequestContextGetter::GetNetworkTaskRunner() const { 239 ShellURLRequestContextGetter::GetNetworkTaskRunner() const {
240 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); 240 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO);
241 } 241 }
242 242
243 net::HostResolver* ShellURLRequestContextGetter::host_resolver() { 243 net::HostResolver* ShellURLRequestContextGetter::host_resolver() {
244 return url_request_context_->host_resolver(); 244 return url_request_context_->host_resolver();
245 } 245 }
246 246
247 } // namespace content 247 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698