| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |