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 #ifndef COMPONENTS_DATA_USE_MEASUREMENT_CORE_URL_REQUEST_CLASSIFIER_H_ | 5 #ifndef COMPONENTS_DATA_USE_MEASUREMENT_CORE_URL_REQUEST_CLASSIFIER_H_ |
6 #define COMPONENTS_DATA_USE_MEASUREMENT_CORE_URL_REQUEST_CLASSIFIER_H_ | 6 #define COMPONENTS_DATA_USE_MEASUREMENT_CORE_URL_REQUEST_CLASSIFIER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "components/data_use_measurement/core/data_use_user_data.h" | 10 #include "components/data_use_measurement/core/data_use_user_data.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 // Returns the content type of the URL request |request| with response headers | 27 // Returns the content type of the URL request |request| with response headers |
28 // |response_headers|. |is_app_foreground| and |is_tab_visible| indicate the | 28 // |response_headers|. |is_app_foreground| and |is_tab_visible| indicate the |
29 // current app and tab visibility state. | 29 // current app and tab visibility state. |
30 virtual DataUseUserData::DataUseContentType GetContentType( | 30 virtual DataUseUserData::DataUseContentType GetContentType( |
31 const net::URLRequest& request, | 31 const net::URLRequest& request, |
32 const net::HttpResponseHeaders& response_headers) const = 0; | 32 const net::HttpResponseHeaders& response_headers) const = 0; |
33 | 33 |
34 // Records the page transition histograms. | 34 // Records the page transition histograms. |
35 virtual void RecordPageTransitionUMA(uint64_t page_transition, | 35 virtual void RecordPageTransitionUMA(uint64_t page_transition, |
36 int64_t received_bytes) const = 0; | 36 int64_t received_bytes) const = 0; |
| 37 |
| 38 // Returns true if |request| is fetching a favicon. |
| 39 virtual bool IsFavIconRequest(const net::URLRequest& request) const = 0; |
37 }; | 40 }; |
38 | 41 |
39 } // namespace data_use_measurement | 42 } // namespace data_use_measurement |
40 | 43 |
41 #endif // COMPONENTS_DATA_USE_MEASUREMENT_CORE_URL_REQUEST_CLASSIFIER_H_ | 44 #endif // COMPONENTS_DATA_USE_MEASUREMENT_CORE_URL_REQUEST_CLASSIFIER_H_ |
OLD | NEW |