OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 NET_LOG_NET_LOG_CAPTURE_MODE_H_ | 5 #ifndef NET_LOG_NET_LOG_CAPTURE_MODE_H_ |
6 #define NET_LOG_NET_LOG_CAPTURE_MODE_H_ | 6 #define NET_LOG_NET_LOG_CAPTURE_MODE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 // Constructs a capture mode which logs basic events and event parameters. | 26 // Constructs a capture mode which logs basic events and event parameters. |
27 // include_cookies_and_credentials() --> false | 27 // include_cookies_and_credentials() --> false |
28 // include_socket_bytes() --> false | 28 // include_socket_bytes() --> false |
29 static NetLogCaptureMode Default(); | 29 static NetLogCaptureMode Default(); |
30 | 30 |
31 // Constructs a capture mode which logs basic events, and additionally makes | 31 // Constructs a capture mode which logs basic events, and additionally makes |
32 // no effort to strip cookies and credentials. | 32 // no effort to strip cookies and credentials. |
33 // include_cookies_and_credentials() --> true | 33 // include_cookies_and_credentials() --> true |
34 // include_socket_bytes() --> false | 34 // include_socket_bytes() --> false |
| 35 // TODO(bnc): Consider renaming to IncludePrivacyInfo(). |
35 static NetLogCaptureMode IncludeCookiesAndCredentials(); | 36 static NetLogCaptureMode IncludeCookiesAndCredentials(); |
36 | 37 |
37 // Constructs a capture mode which logs the data sent/received from sockets. | 38 // Constructs a capture mode which logs the data sent/received from sockets. |
38 // include_cookies_and_credentials() --> true | 39 // include_cookies_and_credentials() --> true |
39 // include_socket_bytes() --> true | 40 // include_socket_bytes() --> true |
40 static NetLogCaptureMode IncludeSocketBytes(); | 41 static NetLogCaptureMode IncludeSocketBytes(); |
41 | 42 |
42 // If include_cookies_and_credentials() is true , then it is OK to log | 43 // If include_cookies_and_credentials() is true , then it is OK to log |
43 // events which contain cookies, credentials or other privacy sensitive data. | 44 // events which contain cookies, credentials or other privacy sensitive data. |
| 45 // TODO(bnc): Consider renaming to include_privacy_info(). |
44 bool include_cookies_and_credentials() const; | 46 bool include_cookies_and_credentials() const; |
45 | 47 |
46 // If include_socket_bytes() is true, then it is OK to output the actual | 48 // If include_socket_bytes() is true, then it is OK to output the actual |
47 // bytes read/written from the network, even if it contains private data. | 49 // bytes read/written from the network, even if it contains private data. |
48 bool include_socket_bytes() const; | 50 bool include_socket_bytes() const; |
49 | 51 |
50 bool operator==(NetLogCaptureMode mode) const; | 52 bool operator==(NetLogCaptureMode mode) const; |
51 bool operator!=(NetLogCaptureMode mode) const; | 53 bool operator!=(NetLogCaptureMode mode) const; |
52 | 54 |
53 private: | 55 private: |
54 explicit NetLogCaptureMode(uint32_t value); | 56 explicit NetLogCaptureMode(uint32_t value); |
55 | 57 |
56 int32_t value_; | 58 int32_t value_; |
57 }; | 59 }; |
58 | 60 |
59 } // namespace net | 61 } // namespace net |
60 | 62 |
61 #endif // NET_LOG_NET_LOG_CAPTURE_MODE_H_ | 63 #endif // NET_LOG_NET_LOG_CAPTURE_MODE_H_ |
OLD | NEW |