Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Unified Diff: net/log/trace_net_log_observer.cc

Issue 2315613002: Extracted NetLog class's inner enum types into their own enum classes and (Closed)
Patch Set: Ran "git cl format" on code. Much formatting ensued. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/log/test_net_log_util.cc ('k') | net/log/trace_net_log_observer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/log/trace_net_log_observer.cc
diff --git a/net/log/trace_net_log_observer.cc b/net/log/trace_net_log_observer.cc
index 81d8d8aa0270aae41b3b4c5ae219c4c36c6bfa41..6ec2e3c3ce6a27ec81174072d78f9ddfadfc0448 100644
--- a/net/log/trace_net_log_observer.cc
+++ b/net/log/trace_net_log_observer.cc
@@ -15,6 +15,7 @@
#include "base/trace_event/trace_event.h"
#include "base/values.h"
#include "net/log/net_log.h"
+#include "net/log/net_log_event_type.h"
namespace net {
@@ -58,7 +59,7 @@ TraceNetLogObserver::~TraceNetLogObserver() {
void TraceNetLogObserver::OnAddEntry(const NetLog::Entry& entry) {
std::unique_ptr<base::Value> params(entry.ParametersToValue());
switch (entry.phase()) {
- case NetLog::PHASE_BEGIN:
+ case NetLogEventPhase::BEGIN:
TRACE_EVENT_NESTABLE_ASYNC_BEGIN2(
kNetLogTracingCategory, NetLog::EventTypeToString(entry.type()),
entry.source().id, "source_type",
@@ -66,7 +67,7 @@ void TraceNetLogObserver::OnAddEntry(const NetLog::Entry& entry) {
std::unique_ptr<base::trace_event::ConvertableToTraceFormat>(
new TracedValue(std::move(params))));
break;
- case NetLog::PHASE_END:
+ case NetLogEventPhase::END:
TRACE_EVENT_NESTABLE_ASYNC_END2(
kNetLogTracingCategory, NetLog::EventTypeToString(entry.type()),
entry.source().id, "source_type",
@@ -74,7 +75,7 @@ void TraceNetLogObserver::OnAddEntry(const NetLog::Entry& entry) {
std::unique_ptr<base::trace_event::ConvertableToTraceFormat>(
new TracedValue(std::move(params))));
break;
- case NetLog::PHASE_NONE:
+ case NetLogEventPhase::NONE:
TRACE_EVENT_NESTABLE_ASYNC_INSTANT2(
kNetLogTracingCategory, NetLog::EventTypeToString(entry.type()),
entry.source().id, "source_type",
« no previous file with comments | « net/log/test_net_log_util.cc ('k') | net/log/trace_net_log_observer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698