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

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

Issue 1059843002: Refactor NetLog::LogLevel --> NetLogCaptureMode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again to fix a merge conflict Created 5 years, 8 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
« no previous file with comments | « net/udp/udp_socket_win.cc ('k') | net/url_request/url_request_job.cc » ('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 863 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 // NetworkDelegate::NotifyURLRequestDestroyed notifies the NetworkDelegate 874 // NetworkDelegate::NotifyURLRequestDestroyed notifies the NetworkDelegate
875 // that the callback becomes invalid. 875 // that the callback becomes invalid.
876 job_->Kill(); 876 job_->Kill();
877 job_->DetachRequest(); // ensures that the job will not call us again 877 job_->DetachRequest(); // ensures that the job will not call us again
878 job_ = NULL; 878 job_ = NULL;
879 } 879 }
880 880
881 int URLRequest::Redirect(const RedirectInfo& redirect_info) { 881 int URLRequest::Redirect(const RedirectInfo& redirect_info) {
882 // Matches call in NotifyReceivedRedirect. 882 // Matches call in NotifyReceivedRedirect.
883 OnCallToDelegateComplete(); 883 OnCallToDelegateComplete();
884 if (net_log_.IsLogging()) { 884 if (net_log_.GetCaptureMode().enabled()) {
885 net_log_.AddEvent( 885 net_log_.AddEvent(
886 NetLog::TYPE_URL_REQUEST_REDIRECTED, 886 NetLog::TYPE_URL_REQUEST_REDIRECTED,
887 NetLog::StringCallback("location", 887 NetLog::StringCallback("location",
888 &redirect_info.new_url.possibly_invalid_spec())); 888 &redirect_info.new_url.possibly_invalid_spec()));
889 } 889 }
890 890
891 // TODO(davidben): Pass the full RedirectInfo to the NetworkDelegate. 891 // TODO(davidben): Pass the full RedirectInfo to the NetworkDelegate.
892 if (network_delegate_) 892 if (network_delegate_)
893 network_delegate_->NotifyBeforeRedirect(this, redirect_info.new_url); 893 network_delegate_->NotifyBeforeRedirect(this, redirect_info.new_url);
894 894
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
1173 new base::debug::StackTrace(NULL, 0); 1173 new base::debug::StackTrace(NULL, 0);
1174 *stack_trace_copy = stack_trace; 1174 *stack_trace_copy = stack_trace;
1175 stack_trace_.reset(stack_trace_copy); 1175 stack_trace_.reset(stack_trace_copy);
1176 } 1176 }
1177 1177
1178 const base::debug::StackTrace* URLRequest::stack_trace() const { 1178 const base::debug::StackTrace* URLRequest::stack_trace() const {
1179 return stack_trace_.get(); 1179 return stack_trace_.get();
1180 } 1180 }
1181 1181
1182 } // namespace net 1182 } // namespace net
OLDNEW
« no previous file with comments | « net/udp/udp_socket_win.cc ('k') | net/url_request/url_request_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698