| OLD | NEW |
| 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.h" | 5 #include "net/url_request/url_request.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 DCHECK(upload_->is_chunked()); | 231 DCHECK(upload_->is_chunked()); |
| 232 DCHECK_GT(bytes_len, 0); | 232 DCHECK_GT(bytes_len, 0); |
| 233 upload_->AppendChunk(bytes, bytes_len, is_last_chunk); | 233 upload_->AppendChunk(bytes, bytes_len, is_last_chunk); |
| 234 } | 234 } |
| 235 | 235 |
| 236 void URLRequest::set_upload(UploadData* upload) { | 236 void URLRequest::set_upload(UploadData* upload) { |
| 237 upload_ = upload; | 237 upload_ = upload; |
| 238 } | 238 } |
| 239 | 239 |
| 240 // Get the upload data directly. | 240 // Get the upload data directly. |
| 241 UploadData* URLRequest::get_upload() { | 241 const UploadData* URLRequest::get_upload() const { |
| 242 return upload_.get(); | 242 return upload_.get(); |
| 243 } | 243 } |
| 244 | 244 |
| 245 UploadData* URLRequest::get_upload_mutable() { |
| 246 return upload_.get(); |
| 247 } |
| 248 |
| 245 bool URLRequest::has_upload() const { | 249 bool URLRequest::has_upload() const { |
| 246 return upload_ != NULL; | 250 return upload_ != NULL; |
| 247 } | 251 } |
| 248 | 252 |
| 249 void URLRequest::SetExtraRequestHeaderById(int id, const string& value, | 253 void URLRequest::SetExtraRequestHeaderById(int id, const string& value, |
| 250 bool overwrite) { | 254 bool overwrite) { |
| 251 DCHECK(!is_pending_); | 255 DCHECK(!is_pending_); |
| 252 NOTREACHED() << "implement me!"; | 256 NOTREACHED() << "implement me!"; |
| 253 } | 257 } |
| 254 | 258 |
| (...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 911 new base::debug::StackTrace(NULL, 0); | 915 new base::debug::StackTrace(NULL, 0); |
| 912 *stack_trace_copy = stack_trace; | 916 *stack_trace_copy = stack_trace; |
| 913 stack_trace_.reset(stack_trace_copy); | 917 stack_trace_.reset(stack_trace_copy); |
| 914 } | 918 } |
| 915 | 919 |
| 916 const base::debug::StackTrace* URLRequest::stack_trace() const { | 920 const base::debug::StackTrace* URLRequest::stack_trace() const { |
| 917 return stack_trace_.get(); | 921 return stack_trace_.get(); |
| 918 } | 922 } |
| 919 | 923 |
| 920 } // namespace net | 924 } // namespace net |
| OLD | NEW |