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

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

Issue 11419034: net: Move ownership of UploadDataStream from URLRequestHttpJob to URLRequest (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove a local variable Created 8 years 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
« no previous file with comments | « net/url_request/url_request_http_job.h ('k') | net/url_request/url_request_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
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 10 matching lines...) Expand all
21 #include "net/base/filter.h" 21 #include "net/base/filter.h"
22 #include "net/base/host_port_pair.h" 22 #include "net/base/host_port_pair.h"
23 #include "net/base/load_flags.h" 23 #include "net/base/load_flags.h"
24 #include "net/base/mime_util.h" 24 #include "net/base/mime_util.h"
25 #include "net/base/net_errors.h" 25 #include "net/base/net_errors.h"
26 #include "net/base/net_util.h" 26 #include "net/base/net_util.h"
27 #include "net/base/network_delegate.h" 27 #include "net/base/network_delegate.h"
28 #include "net/base/sdch_manager.h" 28 #include "net/base/sdch_manager.h"
29 #include "net/base/ssl_cert_request_info.h" 29 #include "net/base/ssl_cert_request_info.h"
30 #include "net/base/ssl_config_service.h" 30 #include "net/base/ssl_config_service.h"
31 #include "net/base/upload_data_stream.h"
32 #include "net/cookies/cookie_monster.h" 31 #include "net/cookies/cookie_monster.h"
33 #include "net/http/http_network_session.h" 32 #include "net/http/http_network_session.h"
34 #include "net/http/http_request_headers.h" 33 #include "net/http/http_request_headers.h"
35 #include "net/http/http_response_headers.h" 34 #include "net/http/http_response_headers.h"
36 #include "net/http/http_response_info.h" 35 #include "net/http/http_response_info.h"
37 #include "net/http/http_status_code.h" 36 #include "net/http/http_status_code.h"
38 #include "net/http/http_transaction.h" 37 #include "net/http/http_transaction.h"
39 #include "net/http/http_transaction_delegate.h" 38 #include "net/http/http_transaction_delegate.h"
40 #include "net/http/http_transaction_factory.h" 39 #include "net/http/http_transaction_factory.h"
41 #include "net/http/http_util.h" 40 #include "net/http/http_util.h"
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 ResetTimer(); 886 ResetTimer();
888 887
889 // Update the cookies, since the cookie store may have been updated from the 888 // Update the cookies, since the cookie store may have been updated from the
890 // headers in the 401/407. Since cookies were already appended to 889 // headers in the 401/407. Since cookies were already appended to
891 // extra_headers, we need to strip them out before adding them again. 890 // extra_headers, we need to strip them out before adding them again.
892 request_info_.extra_headers.RemoveHeader(HttpRequestHeaders::kCookie); 891 request_info_.extra_headers.RemoveHeader(HttpRequestHeaders::kCookie);
893 892
894 AddCookieHeaderAndStart(); 893 AddCookieHeaderAndStart();
895 } 894 }
896 895
897 void URLRequestHttpJob::SetUpload(UploadData* upload) { 896 void URLRequestHttpJob::SetUpload(UploadDataStream* upload) {
898 DCHECK(!transaction_.get()) << "cannot change once started"; 897 DCHECK(!transaction_.get()) << "cannot change once started";
899 upload_data_stream_.reset(new UploadDataStream(upload)); 898 request_info_.upload_data_stream = upload;
900 request_info_.upload_data_stream = upload_data_stream_.get();
901 } 899 }
902 900
903 void URLRequestHttpJob::SetExtraRequestHeaders( 901 void URLRequestHttpJob::SetExtraRequestHeaders(
904 const HttpRequestHeaders& headers) { 902 const HttpRequestHeaders& headers) {
905 DCHECK(!transaction_.get()) << "cannot change once started"; 903 DCHECK(!transaction_.get()) << "cannot change once started";
906 request_info_.extra_headers.CopyFrom(headers); 904 request_info_.extra_headers.CopyFrom(headers);
907 } 905 }
908 906
909 void URLRequestHttpJob::Start() { 907 void URLRequestHttpJob::Start() {
910 DCHECK(!transaction_.get()); 908 DCHECK(!transaction_.get());
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
1611 1609
1612 void URLRequestHttpJob::NotifyURLRequestDestroyed() { 1610 void URLRequestHttpJob::NotifyURLRequestDestroyed() {
1613 awaiting_callback_ = false; 1611 awaiting_callback_ = false;
1614 } 1612 }
1615 1613
1616 void URLRequestHttpJob::OnDetachRequest() { 1614 void URLRequestHttpJob::OnDetachRequest() {
1617 http_transaction_delegate_->OnDetachRequest(); 1615 http_transaction_delegate_->OnDetachRequest();
1618 } 1616 }
1619 1617
1620 } // namespace net 1618 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request_http_job.h ('k') | net/url_request/url_request_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698