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

Unified Diff: content/browser/loader/resource_loader.cc

Issue 451623002: Getting rid of net::LOAD_ENABLE_LOAD_TIMING (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed content/browser/loader/resource_scheduler_unittest.cc. Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/loader/resource_loader.cc
diff --git a/content/browser/loader/resource_loader.cc b/content/browser/loader/resource_loader.cc
index d82cf07302dd6bf9cbf6bee033a1c0f549a0e60f..f8a70d14620154d5a3c9620936afd9cd272993a4 100644
--- a/content/browser/loader/resource_loader.cc
+++ b/content/browser/loader/resource_loader.cc
@@ -38,7 +38,8 @@ using base::TimeTicks;
namespace content {
namespace {
-void PopulateResourceResponse(net::URLRequest* request,
+void PopulateResourceResponse(ResourceRequestInfoImpl* info,
+ net::URLRequest* request,
ResourceResponse* response) {
response->head.error_code = request->status().error();
response->head.request_time = request->request_time();
@@ -65,8 +66,7 @@ void PopulateResourceResponse(net::URLRequest* request,
request,
&response->head.appcache_id,
&response->head.appcache_manifest_url);
- // TODO(mmenke): Figure out if LOAD_ENABLE_LOAD_TIMING is safe to remove.
- if (request->load_flags() & net::LOAD_ENABLE_LOAD_TIMING)
+ if (info->is_load_timing_enabled())
request->GetLoadTimingInfo(&response->head.load_timing);
}
@@ -228,7 +228,7 @@ void ResourceLoader::OnReceivedRedirect(net::URLRequest* unused,
}
scoped_refptr<ResourceResponse> response(new ResourceResponse());
- PopulateResourceResponse(request_.get(), response.get());
+ PopulateResourceResponse(info, request_.get(), response.get());
if (!handler_->OnRequestRedirected(new_url, response.get(), defer)) {
Cancel();
@@ -527,7 +527,7 @@ void ResourceLoader::CompleteResponseStarted() {
ResourceRequestInfoImpl* info = GetRequestInfo();
scoped_refptr<ResourceResponse> response(new ResourceResponse());
- PopulateResourceResponse(request_.get(), response.get());
+ PopulateResourceResponse(info, request_.get(), response.get());
if (request_->ssl_info().cert.get()) {
int cert_id = CertStore::GetInstance()->StoreCert(
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.cc ('k') | content/browser/loader/resource_request_info_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698