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

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

Issue 10832003: Add const accessors to URLRequest and UploadData. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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
« net/url_request/url_request.h ('K') | « net/url_request/url_request.h ('k') | no next file » | 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.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
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 const UploadData* URLRequest::get_upload() const {
242 return upload_.get();
243 }
244
241 UploadData* URLRequest::get_upload() { 245 UploadData* URLRequest::get_upload() {
242 return upload_.get(); 246 return upload_.get();
243 } 247 }
244 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) {
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« net/url_request/url_request.h ('K') | « net/url_request/url_request.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698