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

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

Issue 1921613003: Count successes of link rel=prefetch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove braces Created 4 years, 8 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 | « no previous file | net/url_request/url_request_http_job.cc » ('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 (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 "content/browser/loader/resource_loader.h" 5 #include "content/browser/loader/resource_loader.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 status = STATUS_CANCELED; 737 status = STATUS_CANCELED;
738 UMA_HISTOGRAM_TIMES("Net.Prefetch.TimeBeforeCancel", total_time); 738 UMA_HISTOGRAM_TIMES("Net.Prefetch.TimeBeforeCancel", total_time);
739 break; 739 break;
740 case net::URLRequestStatus::IO_PENDING: 740 case net::URLRequestStatus::IO_PENDING:
741 case net::URLRequestStatus::FAILED: 741 case net::URLRequestStatus::FAILED:
742 status = STATUS_UNDEFINED; 742 status = STATUS_UNDEFINED;
743 break; 743 break;
744 } 744 }
745 745
746 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX); 746 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX);
747 } else if (request_->response_info().unused_since_prefetch) {
748 TimeDelta total_time = base::TimeTicks::Now() - request_->creation_time();
749 UMA_HISTOGRAM_TIMES("Net.Prefetch.TimeSpentOnPrefetchHit", total_time);
747 } 750 }
748 } 751 }
749 752
750 } // namespace content 753 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | net/url_request/url_request_http_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698