xref: /aosp_15_r20/external/cronet/net/log/net_log_event_type.h (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 // Copyright 2016 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef NET_LOG_NET_LOG_EVENT_TYPE_H_
6 #define NET_LOG_NET_LOG_EVENT_TYPE_H_
7 
8 #include <ostream>
9 
10 #include "net/base/net_export.h"
11 
12 namespace net {
13 
14 enum class NetLogEventType {
15 #define EVENT_TYPE(label) label,
16 #include "net/log/net_log_event_type_list.h"
17 #undef EVENT_TYPE
18   COUNT
19 };
20 
21 // Returns a C-String symbolic name for |type|.
22 NET_EXPORT const char* NetLogEventTypeToString(NetLogEventType type);
23 
24 // For convenience in tests.
25 NET_EXPORT std::ostream& operator<<(std::ostream& os, NetLogEventType type);
26 
27 // The 'phase' of an event trace (whether it marks the beginning or end
28 // of an event.).
29 enum class NetLogEventPhase {
30   NONE,
31   BEGIN,
32   END,
33 };
34 
35 }  // namespace net
36 
37 #endif  // NET_LOG_NET_LOG_EVENT_TYPE_H_
38