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

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

Issue 10534100: Decouple URLRequestJob from URLRequestContext; access NetworkDelegate as a contructor parameter. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 6 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_http_job.h" 5 #include "net/url_request/url_request_http_job.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 } 141 }
142 142
143 GURL redirect_url; 143 GURL redirect_url;
144 if (request->GetHSTSRedirect(&redirect_url)) 144 if (request->GetHSTSRedirect(&redirect_url))
145 return new URLRequestRedirectJob(request, redirect_url); 145 return new URLRequestRedirectJob(request, redirect_url);
146 return new URLRequestHttpJob(request); 146 return new URLRequestHttpJob(request);
147 } 147 }
148 148
149 149
150 URLRequestHttpJob::URLRequestHttpJob(URLRequest* request) 150 URLRequestHttpJob::URLRequestHttpJob(URLRequest* request)
151 : URLRequestJob(request), 151 : URLRequestJob(request, request->context()->network_delegate()),
152 response_info_(NULL), 152 response_info_(NULL),
153 response_cookies_save_index_(0), 153 response_cookies_save_index_(0),
154 proxy_auth_state_(AUTH_STATE_DONT_NEED_AUTH), 154 proxy_auth_state_(AUTH_STATE_DONT_NEED_AUTH),
155 server_auth_state_(AUTH_STATE_DONT_NEED_AUTH), 155 server_auth_state_(AUTH_STATE_DONT_NEED_AUTH),
156 ALLOW_THIS_IN_INITIALIZER_LIST(start_callback_( 156 ALLOW_THIS_IN_INITIALIZER_LIST(start_callback_(
157 base::Bind(&URLRequestHttpJob::OnStartCompleted, 157 base::Bind(&URLRequestHttpJob::OnStartCompleted,
158 base::Unretained(this)))), 158 base::Unretained(this)))),
159 ALLOW_THIS_IN_INITIALIZER_LIST(notify_before_headers_sent_callback_( 159 ALLOW_THIS_IN_INITIALIZER_LIST(notify_before_headers_sent_callback_(
160 base::Bind(&URLRequestHttpJob::NotifyBeforeSendHeadersCallback, 160 base::Bind(&URLRequestHttpJob::NotifyBeforeSendHeadersCallback,
161 base::Unretained(this)))), 161 base::Unretained(this)))),
(...skipping 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after
1387 return override_response_headers_.get() ? 1387 return override_response_headers_.get() ?
1388 override_response_headers_ : 1388 override_response_headers_ :
1389 transaction_->GetResponseInfo()->headers; 1389 transaction_->GetResponseInfo()->headers;
1390 } 1390 }
1391 1391
1392 void URLRequestHttpJob::NotifyURLRequestDestroyed() { 1392 void URLRequestHttpJob::NotifyURLRequestDestroyed() {
1393 awaiting_callback_ = false; 1393 awaiting_callback_ = false;
1394 } 1394 }
1395 1395
1396 } // namespace net 1396 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698