Extracted NetLog class's inner enum types into their own enum classes and
refactored codebase accordingly. This is the first step towards achieving
the "Don't use so many inner classes for NetLog" cleanup ticket, which
seeks to make the codebase more "Include what you use" clean.

There are many "net/log/net_log.h" includes in the codebase. Since 'net_log.h'
has many includes itself, this leaves the codebase susceptible to the
undesirable scenario where clients of 'net_log.h' could be relying upon
'net_log.h' not for its contents but its inner includes.

Extracting NetLog's inner classes into their own files will help with the
above issue. For instance, once these inner NetLog classes are extracted:
ThreadSafeObserver, Entry, EntryData, NetLog enum types, then
ThreadSafeObserver clients will not need to include "net_log.h".

Here are a couple historical notes:

1) In refactoring "NetLog::TYPE_SSL_PRIVATE_KEY_OPERATION" to
"NetLogEventType::SSL_PRIVATE_KEY_OPERATION", the removal of "TYPE_" from
"TYPE_SSL_PRIVATE_KEY_OPERATION" created a compiler error when compiling
an ssl-based object file because it turns out that SSL_PRIVATE_KEY_OPERATION
is a macro definition in the ssl translation unit; this resulted in
a macro collision. To resolve, "NetLogEventType::SSL_PRIVATE_KEY_OPERATION"
was changed to "NetLogEventType::SSL_PRIVATE_KEY_OP".
    - There aren't any dependencies in the [netlog viewer] code
       that depend on the old naming so this should be fine.

2) The new enum classes, as opposed to enums, made it so that
[NetLogEnumClass]::LABEL needed to be statically cast to int at times.
-e.g.- In NetLog::GetEventTypesAsValue()'s for loop to
       iterate through all enums.
       - Also had to do this in 2 or 3 instances outside of net_log.cc.

BUG=473710
[email protected],[email protected]
[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]

Review-Url: https://codereview.chromium.org/2315613002
Cr-Commit-Position: refs/heads/master@{#417358}
diff --git a/net/quic/chromium/quic_http_stream_test.cc b/net/quic/chromium/quic_http_stream_test.cc
index c4461f2..ecd179b 100644
--- a/net/quic/chromium/quic_http_stream_test.cc
+++ b/net/quic/chromium/quic_http_stream_test.cc
@@ -20,6 +20,7 @@
 #include "net/base/upload_bytes_element_reader.h"
 #include "net/http/http_response_headers.h"
 #include "net/http/transport_security_state.h"
+#include "net/log/net_log_event_type.h"
 #include "net/log/test_net_log.h"
 #include "net/log/test_net_log_util.h"
 #include "net/quic/chromium/crypto/proof_verifier_chromium.h"
@@ -727,16 +728,16 @@
   net_log_.GetEntries(&entries);
   size_t pos = ExpectLogContainsSomewhere(
       entries, /*min_offset=*/0,
-      NetLog::TYPE_QUIC_CHROMIUM_CLIENT_STREAM_SEND_REQUEST_HEADERS,
-      NetLog::PHASE_NONE);
+      NetLogEventType::QUIC_CHROMIUM_CLIENT_STREAM_SEND_REQUEST_HEADERS,
+      NetLogEventPhase::NONE);
   pos = ExpectLogContainsSomewhere(
       entries, /*min_offset=*/pos,
-      NetLog::TYPE_QUIC_CHROMIUM_CLIENT_STREAM_SEND_REQUEST_HEADERS,
-      NetLog::PHASE_NONE);
+      NetLogEventType::QUIC_CHROMIUM_CLIENT_STREAM_SEND_REQUEST_HEADERS,
+      NetLogEventPhase::NONE);
   ExpectLogContainsSomewhere(
       entries, /*min_offset=*/pos,
-      NetLog::TYPE_QUIC_CHROMIUM_CLIENT_STREAM_SEND_REQUEST_HEADERS,
-      NetLog::PHASE_NONE);
+      NetLogEventType::QUIC_CHROMIUM_CLIENT_STREAM_SEND_REQUEST_HEADERS,
+      NetLogEventPhase::NONE);
 }
 
 // Regression test for http://crbug.com/288128