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

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

Issue 2316573002: PlzNavigate: Support ResourceTiming API (Closed)
Patch Set: Rebase Created 4 years, 2 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 | « content/browser/frame_host/navigation_request.cc ('k') | content/child/web_url_loader_impl.h » ('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 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_resource_handler.h" 5 #include "content/browser/loader/navigation_resource_handler.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "content/browser/loader/navigation_url_loader_impl_core.h" 10 #include "content/browser/loader/navigation_url_loader_impl_core.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 bool NavigationResourceHandler::OnRequestRedirected( 79 bool NavigationResourceHandler::OnRequestRedirected(
80 const net::RedirectInfo& redirect_info, 80 const net::RedirectInfo& redirect_info,
81 ResourceResponse* response, 81 ResourceResponse* response,
82 bool* defer) { 82 bool* defer) {
83 DCHECK(core_); 83 DCHECK(core_);
84 84
85 // TODO(davidben): Perform a CSP check here, and anything else that would have 85 // TODO(davidben): Perform a CSP check here, and anything else that would have
86 // been done renderer-side. 86 // been done renderer-side.
87 NetLogObserver::PopulateResponseInfo(request(), response); 87 NetLogObserver::PopulateResponseInfo(request(), response);
88 response->head.encoded_data_length = request()->GetTotalReceivedBytes();
88 core_->NotifyRequestRedirected(redirect_info, response); 89 core_->NotifyRequestRedirected(redirect_info, response);
89 *defer = true; 90 *defer = true;
90 return true; 91 return true;
91 } 92 }
92 93
93 bool NavigationResourceHandler::OnResponseStarted(ResourceResponse* response, 94 bool NavigationResourceHandler::OnResponseStarted(ResourceResponse* response,
94 bool* defer) { 95 bool* defer) {
95 DCHECK(core_); 96 DCHECK(core_);
96 97
97 ResourceRequestInfoImpl* info = GetRequestInfo(); 98 ResourceRequestInfoImpl* info = GetRequestInfo();
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 NOTREACHED(); 181 NOTREACHED();
181 } 182 }
182 183
183 void NavigationResourceHandler::DetachFromCore() { 184 void NavigationResourceHandler::DetachFromCore() {
184 DCHECK(core_); 185 DCHECK(core_);
185 core_->set_resource_handler(nullptr); 186 core_->set_resource_handler(nullptr);
186 core_ = nullptr; 187 core_ = nullptr;
187 } 188 }
188 189
189 } // namespace content 190 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_request.cc ('k') | content/child/web_url_loader_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698