| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "components/data_use_measurement/content/content_url_request_classifier
.h" | 5 #include "components/data_use_measurement/content/content_url_request_classifier
.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
| 10 #include "base/metrics/sparse_histogram.h" | 10 #include "base/metrics/sparse_histogram.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 STATIC_HISTOGRAM_POINTER_BLOCK( | 149 STATIC_HISTOGRAM_POINTER_BLOCK( |
| 150 "DataUse.PageTransition.UserTraffic", | 150 "DataUse.PageTransition.UserTraffic", |
| 151 AddCount(data_use_page_transition, received_bytes), | 151 AddCount(data_use_page_transition, received_bytes), |
| 152 base::LinearHistogram::FactoryGet( | 152 base::LinearHistogram::FactoryGet( |
| 153 "DataUse.PageTransition.UserTraffic", 1, | 153 "DataUse.PageTransition.UserTraffic", 1, |
| 154 DataUsePageTransition::TRANSITION_MAX, | 154 DataUsePageTransition::TRANSITION_MAX, |
| 155 DataUsePageTransition::TRANSITION_MAX + 1, | 155 DataUsePageTransition::TRANSITION_MAX + 1, |
| 156 base::HistogramBase::kUmaTargetedHistogramFlag)); | 156 base::HistogramBase::kUmaTargetedHistogramFlag)); |
| 157 } | 157 } |
| 158 | 158 |
| 159 bool ContentURLRequestClassifier::IsFavIconRequest( |
| 160 const net::URLRequest& request) const { |
| 161 const content::ResourceRequestInfo* request_info = |
| 162 content::ResourceRequestInfo::ForRequest(&request); |
| 163 return request_info && request_info->GetResourceType() == |
| 164 content::ResourceType::RESOURCE_TYPE_FAVICON; |
| 165 } |
| 166 |
| 159 } // namespace data_use_measurement | 167 } // namespace data_use_measurement |
| OLD | NEW |