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

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

Issue 2355703002: Remove all OnBeforeNetworkAccessed code above NetworkTransaction. (Closed)
Patch Set: Created 4 years, 3 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/url_request/url_request_job.h ('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_job.h" 5 #include "net/url_request/url_request_job.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 // OnReceivedRedirect. 311 // OnReceivedRedirect.
312 312
313 // It is also possible that FollowRedirect will delete |this|, so not safe to 313 // It is also possible that FollowRedirect will delete |this|, so not safe to
314 // pass along reference to |deferred_redirect_info_|. 314 // pass along reference to |deferred_redirect_info_|.
315 315
316 RedirectInfo redirect_info = deferred_redirect_info_; 316 RedirectInfo redirect_info = deferred_redirect_info_;
317 deferred_redirect_info_ = RedirectInfo(); 317 deferred_redirect_info_ = RedirectInfo();
318 FollowRedirect(redirect_info); 318 FollowRedirect(redirect_info);
319 } 319 }
320 320
321 void URLRequestJob::ResumeNetworkStart() {
322 // This should only be called for HTTP Jobs, and implemented in the derived
323 // class.
324 NOTREACHED();
325 }
326
327 bool URLRequestJob::GetMimeType(std::string* mime_type) const { 321 bool URLRequestJob::GetMimeType(std::string* mime_type) const {
328 return false; 322 return false;
329 } 323 }
330 324
331 int URLRequestJob::GetResponseCode() const { 325 int URLRequestJob::GetResponseCode() const {
332 return -1; 326 return -1;
333 } 327 }
334 328
335 HostPortPair URLRequestJob::GetSocketAddress() const { 329 HostPortPair URLRequestJob::GetSocketAddress() const {
336 return HostPortPair(); 330 return HostPortPair();
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 int64_t total_sent_bytes = GetTotalSentBytes(); 993 int64_t total_sent_bytes = GetTotalSentBytes();
1000 DCHECK_GE(total_sent_bytes, last_notified_total_sent_bytes_); 994 DCHECK_GE(total_sent_bytes, last_notified_total_sent_bytes_);
1001 if (total_sent_bytes > last_notified_total_sent_bytes_) { 995 if (total_sent_bytes > last_notified_total_sent_bytes_) {
1002 network_delegate_->NotifyNetworkBytesSent( 996 network_delegate_->NotifyNetworkBytesSent(
1003 request_, total_sent_bytes - last_notified_total_sent_bytes_); 997 request_, total_sent_bytes - last_notified_total_sent_bytes_);
1004 } 998 }
1005 last_notified_total_sent_bytes_ = total_sent_bytes; 999 last_notified_total_sent_bytes_ = total_sent_bytes;
1006 } 1000 }
1007 1001
1008 } // namespace net 1002 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request_job.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698