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

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

Issue 1122483004: Remove NetLog::GetCaptureMode() and NetLogCaptureMode::None() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mmenke_refactor
Patch Set: second attempt at fixing int --> bool warning on windows Created 5 years, 7 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 874 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 // NetworkDelegate::NotifyURLRequestDestroyed notifies the NetworkDelegate 885 // NetworkDelegate::NotifyURLRequestDestroyed notifies the NetworkDelegate
886 // that the callback becomes invalid. 886 // that the callback becomes invalid.
887 job_->Kill(); 887 job_->Kill();
888 job_->DetachRequest(); // ensures that the job will not call us again 888 job_->DetachRequest(); // ensures that the job will not call us again
889 job_ = NULL; 889 job_ = NULL;
890 } 890 }
891 891
892 int URLRequest::Redirect(const RedirectInfo& redirect_info) { 892 int URLRequest::Redirect(const RedirectInfo& redirect_info) {
893 // Matches call in NotifyReceivedRedirect. 893 // Matches call in NotifyReceivedRedirect.
894 OnCallToDelegateComplete(); 894 OnCallToDelegateComplete();
895 if (net_log_.GetCaptureMode().enabled()) { 895 if (net_log_.IsCapturing()) {
896 net_log_.AddEvent( 896 net_log_.AddEvent(
897 NetLog::TYPE_URL_REQUEST_REDIRECTED, 897 NetLog::TYPE_URL_REQUEST_REDIRECTED,
898 NetLog::StringCallback("location", 898 NetLog::StringCallback("location",
899 &redirect_info.new_url.possibly_invalid_spec())); 899 &redirect_info.new_url.possibly_invalid_spec()));
900 } 900 }
901 901
902 // TODO(davidben): Pass the full RedirectInfo to the NetworkDelegate. 902 // TODO(davidben): Pass the full RedirectInfo to the NetworkDelegate.
903 if (network_delegate_) 903 if (network_delegate_)
904 network_delegate_->NotifyBeforeRedirect(this, redirect_info.new_url); 904 network_delegate_->NotifyBeforeRedirect(this, redirect_info.new_url);
905 905
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
1184 new base::debug::StackTrace(NULL, 0); 1184 new base::debug::StackTrace(NULL, 0);
1185 *stack_trace_copy = stack_trace; 1185 *stack_trace_copy = stack_trace;
1186 stack_trace_.reset(stack_trace_copy); 1186 stack_trace_.reset(stack_trace_copy);
1187 } 1187 }
1188 1188
1189 const base::debug::StackTrace* URLRequest::stack_trace() const { 1189 const base::debug::StackTrace* URLRequest::stack_trace() const {
1190 return stack_trace_.get(); 1190 return stack_trace_.get();
1191 } 1191 }
1192 1192
1193 } // namespace net 1193 } // 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