| 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 #include "net/log/net_log_capture_mode.h" | 5 #include "net/log/net_log_capture_mode.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 namespace net { | 9 namespace net { |
| 10 | 10 |
| 11 namespace { | 11 namespace { |
| 12 | 12 |
| 13 // Integer representation for the capture mode. The numeric value is depended on | 13 // Integer representation for the capture mode. The numeric value is depended on |
| 14 // for methods of NetLogCaptureMode, which expect that higher values represent a | 14 // for methods of NetLogCaptureMode, which expect that higher values represent a |
| 15 // strict superset of the capabilities of lower values. | 15 // strict superset of the capabilities of lower values. |
| 16 enum InternalValue { | 16 enum InternalValue { |
| 17 // Log all events, but do not include the actual transferred bytes and | 17 // Log all events, but do not include the actual transferred bytes, and |
| 18 // remove cookies and HTTP credentials. | 18 // remove cookies and HTTP credentials and HTTP/2 GOAWAY frame debug data. |
| 19 DEFAULT, | 19 DEFAULT, |
| 20 | 20 |
| 21 // Log all events, but do not include the actual transferred bytes as | 21 // Log all events, but do not include the actual transferred bytes as |
| 22 // parameters for bytes sent/received events. | 22 // parameters for bytes sent/received events. |
| 23 // TODO(bnc): Consider renaming to |
| 24 // INCLUDE_COOKIES_AND_CREDENTIALS_AND_GOAWAY_DEBUG_DATA. |
| 23 INCLUDE_COOKIES_AND_CREDENTIALS, | 25 INCLUDE_COOKIES_AND_CREDENTIALS, |
| 24 | 26 |
| 25 // Log everything possible, even if it is slow and memory expensive. | 27 // Log everything possible, even if it is slow and memory expensive. |
| 26 // Includes logging of transferred bytes. | 28 // Includes logging of transferred bytes. |
| 27 INCLUDE_SOCKET_BYTES, | 29 INCLUDE_SOCKET_BYTES, |
| 28 }; | 30 }; |
| 29 | 31 |
| 30 } // namespace | 32 } // namespace |
| 31 | 33 |
| 32 NetLogCaptureMode::NetLogCaptureMode() : NetLogCaptureMode(DEFAULT) { | 34 NetLogCaptureMode::NetLogCaptureMode() : NetLogCaptureMode(DEFAULT) { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 57 } | 59 } |
| 58 | 60 |
| 59 bool NetLogCaptureMode::operator!=(NetLogCaptureMode mode) const { | 61 bool NetLogCaptureMode::operator!=(NetLogCaptureMode mode) const { |
| 60 return !(*this == mode); | 62 return !(*this == mode); |
| 61 } | 63 } |
| 62 | 64 |
| 63 NetLogCaptureMode::NetLogCaptureMode(uint32_t value) : value_(value) { | 65 NetLogCaptureMode::NetLogCaptureMode(uint32_t value) : value_(value) { |
| 64 } | 66 } |
| 65 | 67 |
| 66 } // namespace net | 68 } // namespace net |
| OLD | NEW |