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

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

Issue 10702137: Replaced static URLRequestHTTPJob factory with non-static protocol handler for HTTP jobs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes requested in comments Created 8 years, 4 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/url_request/http_protocol_handler.h ('k') | net/url_request/url_request_http_job.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "net/url_request/http_protocol_handler.h"
6
7 #include "base/logging.h"
8 #include "net/base/net_errors.h"
9 #include "net/url_request/url_request.h"
10 #include "net/url_request/url_request_http_job.h"
11 #include "net/url_request/url_request_redirect_job.h"
12
13 namespace net {
14
15 HttpProtocolHandler::HttpProtocolHandler(
16 HttpTransactionFactory* http_transaction_factory,
17 NetworkDelegate* network_delegate,
18 URLRequestThrottlerManager* throttler_manager,
19 const std::string& accept_language,
20 const std::string& accept_charset,
21 CookieStore* cookie_store,
22 FraudulentCertificateReporter* fraudulent_certificate_reporter,
23 SSLConfigService* ssl_config_service,
24 TransportSecurityState* transport_security_state)
25 : http_transaction_factory_(http_transaction_factory),
26 network_delegate_(network_delegate),
27 throttler_manager_(throttler_manager),
28 accept_language_(accept_language),
29 accept_charset_(accept_charset),
30 cookie_store_(cookie_store),
31 fraudulent_certificate_reporter_(fraudulent_certificate_reporter),
32 ssl_config_service_(ssl_config_service),
33 transport_security_state_(transport_security_state) {
34 }
35
36 URLRequestJob* HttpProtocolHandler::MaybeCreateJob(URLRequest* request) const {
37 DCHECK(http_transaction_factory_);
mmenke 2012/07/26 16:14:14 Just making sure you saw this comment, since I put
shalev 2012/07/26 17:45:39 Done.
38
39 GURL redirect_url;
40 if (request->GetHSTSRedirect(&redirect_url))
41 return new URLRequestRedirectJob(request, redirect_url);
42 return new URLRequestHttpJob(request,
43 http_transaction_factory_,
44 network_delegate_,
45 throttler_manager_,
46 accept_language_,
47 accept_charset_,
48 cookie_store_,
49 fraudulent_certificate_reporter_,
50 ssl_config_service_,
51 transport_security_state_);
52 }
53
54 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/http_protocol_handler.h ('k') | net/url_request/url_request_http_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698