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

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

Issue 10399083: Make NetLog take in callbacks that return Values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fix merge error 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 | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_proxy_client_socket.cc ('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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 StartJob(URLRequestJobManager::GetInstance()->CreateJob(this)); 438 StartJob(URLRequestJobManager::GetInstance()->CreateJob(this));
439 } 439 }
440 } 440 }
441 441
442 void URLRequest::StartJob(URLRequestJob* job) { 442 void URLRequest::StartJob(URLRequestJob* job) {
443 DCHECK(!is_pending_); 443 DCHECK(!is_pending_);
444 DCHECK(!job_); 444 DCHECK(!job_);
445 445
446 net_log_.BeginEvent( 446 net_log_.BeginEvent(
447 NetLog::TYPE_URL_REQUEST_START_JOB, 447 NetLog::TYPE_URL_REQUEST_START_JOB,
448 make_scoped_refptr(new URLRequestStartEventParameters( 448 base::Bind(&NetLogURLRequestStartCallback,
449 url(), method_, load_flags_, priority_))); 449 &url(), &method_, load_flags_, priority_));
450 450
451 job_ = job; 451 job_ = job;
452 job_->SetExtraRequestHeaders(extra_request_headers_); 452 job_->SetExtraRequestHeaders(extra_request_headers_);
453 453
454 if (upload_.get()) 454 if (upload_.get())
455 job_->SetUpload(upload_.get()); 455 job_->SetUpload(upload_.get());
456 456
457 is_pending_ = true; 457 is_pending_ = true;
458 458
459 response_info_.was_cached = false; 459 response_info_.was_cached = false;
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 new base::debug::StackTrace(NULL, 0); 922 new base::debug::StackTrace(NULL, 0);
923 *stack_trace_copy = stack_trace; 923 *stack_trace_copy = stack_trace;
924 stack_trace_.reset(stack_trace_copy); 924 stack_trace_.reset(stack_trace_copy);
925 } 925 }
926 926
927 const base::debug::StackTrace* URLRequest::stack_trace() const { 927 const base::debug::StackTrace* URLRequest::stack_trace() const {
928 return stack_trace_.get(); 928 return stack_trace_.get();
929 } 929 }
930 930
931 } // namespace net 931 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_proxy_client_socket.cc ('k') | net/url_request/url_request_netlog_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698