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

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

Issue 11276050: Add upload identifier to URLRequest::Start net log event. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix unit test Created 8 years, 1 month 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/base/net_log_event_type_list.h ('k') | net/url_request/url_request_netlog_params.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.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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 } 507 }
508 } 508 }
509 509
510 void URLRequest::StartJob(URLRequestJob* job) { 510 void URLRequest::StartJob(URLRequestJob* job) {
511 DCHECK(!is_pending_); 511 DCHECK(!is_pending_);
512 DCHECK(!job_); 512 DCHECK(!job_);
513 513
514 net_log_.BeginEvent( 514 net_log_.BeginEvent(
515 NetLog::TYPE_URL_REQUEST_START_JOB, 515 NetLog::TYPE_URL_REQUEST_START_JOB,
516 base::Bind(&NetLogURLRequestStartCallback, 516 base::Bind(&NetLogURLRequestStartCallback,
517 &url(), &method_, load_flags_, priority_)); 517 &url(), &method_, load_flags_, priority_,
518 upload_.get() ? upload_->identifier() : -1));
518 519
519 job_ = job; 520 job_ = job;
520 job_->SetExtraRequestHeaders(extra_request_headers_); 521 job_->SetExtraRequestHeaders(extra_request_headers_);
521 522
522 if (upload_.get()) 523 if (upload_.get())
523 job_->SetUpload(upload_.get()); 524 job_->SetUpload(upload_.get());
524 525
525 is_pending_ = true; 526 is_pending_ = true;
526 527
527 response_info_.was_cached = false; 528 response_info_.was_cached = false;
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 new base::debug::StackTrace(NULL, 0); 967 new base::debug::StackTrace(NULL, 0);
967 *stack_trace_copy = stack_trace; 968 *stack_trace_copy = stack_trace;
968 stack_trace_.reset(stack_trace_copy); 969 stack_trace_.reset(stack_trace_copy);
969 } 970 }
970 971
971 const base::debug::StackTrace* URLRequest::stack_trace() const { 972 const base::debug::StackTrace* URLRequest::stack_trace() const {
972 return stack_trace_.get(); 973 return stack_trace_.get();
973 } 974 }
974 975
975 } // namespace net 976 } // namespace net
OLDNEW
« no previous file with comments | « net/base/net_log_event_type_list.h ('k') | net/url_request/url_request_netlog_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698