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

Side by Side Diff: content/browser/loader/navigation_url_loader_impl.cc

Issue 2510083003: PlzNavigate: properly update NavigationHandle for 204/205 and download responses (Closed)
Patch Set: . Created 4 years 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/browser/loader/navigation_url_loader_impl.h" 5 #include "content/browser/loader/navigation_url_loader_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 const scoped_refptr<ResourceResponse>& response) { 80 const scoped_refptr<ResourceResponse>& response) {
81 DCHECK_CURRENTLY_ON(BrowserThread::UI); 81 DCHECK_CURRENTLY_ON(BrowserThread::UI);
82 82
83 delegate_->OnRequestRedirected(redirect_info, response); 83 delegate_->OnRequestRedirected(redirect_info, response);
84 } 84 }
85 85
86 void NavigationURLLoaderImpl::NotifyResponseStarted( 86 void NavigationURLLoaderImpl::NotifyResponseStarted(
87 const scoped_refptr<ResourceResponse>& response, 87 const scoped_refptr<ResourceResponse>& response,
88 std::unique_ptr<StreamHandle> body, 88 std::unique_ptr<StreamHandle> body,
89 const SSLStatus& ssl_status, 89 const SSLStatus& ssl_status,
90 std::unique_ptr<NavigationData> navigation_data) { 90 std::unique_ptr<NavigationData> navigation_data,
91 bool is_download) {
91 DCHECK_CURRENTLY_ON(BrowserThread::UI); 92 DCHECK_CURRENTLY_ON(BrowserThread::UI);
92 93
93 delegate_->OnResponseStarted(response, std::move(body), ssl_status, 94 delegate_->OnResponseStarted(response, std::move(body), ssl_status,
94 std::move(navigation_data)); 95 std::move(navigation_data), is_download);
95 } 96 }
96 97
97 void NavigationURLLoaderImpl::NotifyRequestFailed(bool in_cache, 98 void NavigationURLLoaderImpl::NotifyRequestFailed(bool in_cache,
98 int net_error) { 99 int net_error) {
99 DCHECK_CURRENTLY_ON(BrowserThread::UI); 100 DCHECK_CURRENTLY_ON(BrowserThread::UI);
100 101
101 delegate_->OnRequestFailed(in_cache, net_error); 102 delegate_->OnRequestFailed(in_cache, net_error);
102 } 103 }
103 104
104 void NavigationURLLoaderImpl::NotifyRequestStarted(base::TimeTicks timestamp) { 105 void NavigationURLLoaderImpl::NotifyRequestStarted(base::TimeTicks timestamp) {
105 DCHECK_CURRENTLY_ON(BrowserThread::UI); 106 DCHECK_CURRENTLY_ON(BrowserThread::UI);
106 107
107 delegate_->OnRequestStarted(timestamp); 108 delegate_->OnRequestStarted(timestamp);
108 } 109 }
109 110
110 } // namespace content 111 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698