summaryrefslogtreecommitdiffstats
path: root/net/log/net_log_capture_mode.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/log/net_log_capture_mode.cc')
-rw-r--r--net/log/net_log_capture_mode.cc29
1 files changed, 2 insertions, 27 deletions
diff --git a/net/log/net_log_capture_mode.cc b/net/log/net_log_capture_mode.cc
index 501911e..8ac365f 100644
--- a/net/log/net_log_capture_mode.cc
+++ b/net/log/net_log_capture_mode.cc
@@ -14,9 +14,6 @@ namespace {
// for method of NetLogCaptureMode, which expect that higher values imply more
// capabilities.
enum InternalValue {
- // Don't log any events.
- NONE,
-
// Log all events, but do not include the actual transferred bytes and
// remove cookies and HTTP credentials.
DEFAULT,
@@ -32,12 +29,7 @@ enum InternalValue {
} // namespace
-// Default constructor creates an empty capture mode.
-NetLogCaptureMode::NetLogCaptureMode() : NetLogCaptureMode(NONE) {
-}
-
-NetLogCaptureMode NetLogCaptureMode::None() {
- return NetLogCaptureMode(NONE);
+NetLogCaptureMode::NetLogCaptureMode() : NetLogCaptureMode(DEFAULT) {
}
NetLogCaptureMode NetLogCaptureMode::Default() {
@@ -52,15 +44,6 @@ NetLogCaptureMode NetLogCaptureMode::IncludeSocketBytes() {
return NetLogCaptureMode(INCLUDE_SOCKET_BYTES);
}
-NetLogCaptureMode NetLogCaptureMode::Max(NetLogCaptureMode mode1,
- NetLogCaptureMode mode2) {
- return NetLogCaptureMode(std::max(mode1.value_, mode2.value_));
-}
-
-bool NetLogCaptureMode::enabled() const {
- return value_ != NONE;
-}
-
bool NetLogCaptureMode::include_cookies_and_credentials() const {
return value_ >= INCLUDE_COOKIES_AND_CREDENTIALS;
}
@@ -78,18 +61,10 @@ bool NetLogCaptureMode::operator!=(NetLogCaptureMode mode) const {
}
int32_t NetLogCaptureMode::ToInternalValueForTesting() const {
- return ToInternalValue();
+ return value_;
}
NetLogCaptureMode::NetLogCaptureMode(uint32_t value) : value_(value) {
}
-NetLogCaptureMode NetLogCaptureMode::FromInternalValue(int32_t value) {
- return NetLogCaptureMode(value);
-}
-
-int32_t NetLogCaptureMode::ToInternalValue() const {
- return value_;
-}
-
} // namespace net