blob: 069b3dca60324a761af1153db0f17732daf2b8c2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
// Copyright 2022 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/log/net_log_event_type.h"
#include "base/notreached.h"
namespace net {
const char* NetLogEventTypeToString(NetLogEventType type) {
switch (type) {
#define EVENT_TYPE(label) \
case NetLogEventType::label: \
return #label;
#include "net/log/net_log_event_type_list.h"
#undef EVENT_TYPE
default:
NOTREACHED();
return nullptr;
}
}
std::ostream& operator<<(std::ostream& os, NetLogEventType type) {
return os << NetLogEventTypeToString(type);
}
} // namespace net
|