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 "components/data_use_measurement/core/data_use_user_data.h" | 8 #include "components/data_use_measurement/core/data_use_user_data.h" |
9 | 9 |
10 namespace net { | 10 namespace net { |
(...skipping 10 matching lines...) Expand all Loading... | |
21 | 21 |
22 // Returns true if the URLRequest |request| is initiated by user traffic. | 22 // Returns true if the URLRequest |request| is initiated by user traffic. |
23 virtual bool IsUserRequest(const net::URLRequest& request) const = 0; | 23 virtual bool IsUserRequest(const net::URLRequest& request) const = 0; |
24 | 24 |
25 // Returns the content type of the URL request |request| with response headers | 25 // Returns the content type of the URL request |request| with response headers |
26 // |response_headers|. |is_app_foreground| and |is_tab_visible| indicate the | 26 // |response_headers|. |is_app_foreground| and |is_tab_visible| indicate the |
27 // current app and tab visibility state. | 27 // current app and tab visibility state. |
28 virtual DataUseUserData::DataUseContentType GetContentType( | 28 virtual DataUseUserData::DataUseContentType GetContentType( |
29 const net::URLRequest& request, | 29 const net::URLRequest& request, |
30 const net::HttpResponseHeaders& response_headers) const = 0; | 30 const net::HttpResponseHeaders& response_headers) const = 0; |
31 | |
32 // Returns true if the URLRequest |request| belongs to favicon. | |
RyanSturm
2017/03/22 22:00:26
"Returns true if |request| is fetching a favicon."
Raj
2017/03/23 17:06:46
Done.
| |
33 virtual bool IsFavIconRequest(const net::URLRequest& request) const = 0; | |
31 }; | 34 }; |
32 | 35 |
33 } // namespace data_use_measurement | 36 } // namespace data_use_measurement |
34 | 37 |
35 #endif // COMPONENTS_DATA_USE_MEASUREMENT_CORE_URL_REQUEST_CLASSIFIER_H_ | 38 #endif // COMPONENTS_DATA_USE_MEASUREMENT_CORE_URL_REQUEST_CLASSIFIER_H_ |
OLD | NEW |