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

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

Issue 1072423005: Set network_accessed earlier, when network transaction creates stream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Also set network_accessed in URLRequest::NotifyBeforeNetworkStart 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/http/http_network_transaction.cc ('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 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 if (job) { 761 if (job) {
762 RestartWithJob(job); 762 RestartWithJob(job);
763 } else if (delegate_) { 763 } else if (delegate_) {
764 OnCallToDelegate(); 764 OnCallToDelegate();
765 delegate_->OnReceivedRedirect(this, redirect_info, defer_redirect); 765 delegate_->OnReceivedRedirect(this, redirect_info, defer_redirect);
766 // |this| may be have been destroyed here. 766 // |this| may be have been destroyed here.
767 } 767 }
768 } 768 }
769 769
770 void URLRequest::NotifyBeforeNetworkStart(bool* defer) { 770 void URLRequest::NotifyBeforeNetworkStart(bool* defer) {
771 response_info_.network_accessed = true;
davidben 2015/05/04 17:57:19 Why does this get set in two places and at two com
772
771 if (delegate_ && !notified_before_network_start_) { 773 if (delegate_ && !notified_before_network_start_) {
772 OnCallToDelegate(); 774 OnCallToDelegate();
773 delegate_->OnBeforeNetworkStart(this, defer); 775 delegate_->OnBeforeNetworkStart(this, defer);
774 if (!*defer) 776 if (!*defer)
775 OnCallToDelegateComplete(); 777 OnCallToDelegateComplete();
776 notified_before_network_start_ = true; 778 notified_before_network_start_ = true;
777 } 779 }
778 } 780 }
779 781
780 void URLRequest::ResumeNetworkStart() { 782 void URLRequest::ResumeNetworkStart() {
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
1180 new base::debug::StackTrace(NULL, 0); 1182 new base::debug::StackTrace(NULL, 0);
1181 *stack_trace_copy = stack_trace; 1183 *stack_trace_copy = stack_trace;
1182 stack_trace_.reset(stack_trace_copy); 1184 stack_trace_.reset(stack_trace_copy);
1183 } 1185 }
1184 1186
1185 const base::debug::StackTrace* URLRequest::stack_trace() const { 1187 const base::debug::StackTrace* URLRequest::stack_trace() const {
1186 return stack_trace_.get(); 1188 return stack_trace_.get();
1187 } 1189 }
1188 1190
1189 } // namespace net 1191 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_transaction.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698