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

Unified Diff: net/log/net_log_util.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/net_log_unittest.cc ('k') | net/log/test_net_log.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/log/net_log_util.cc
diff --git a/net/log/net_log_util.cc b/net/log/net_log_util.cc
index 48d3fc302096c8c42a84418bc9f3be550ec2f02b..1bf731a9bbe118d027c00efc5b4d6b620178bd0f 100644
--- a/net/log/net_log_util.cc
+++ b/net/log/net_log_util.cc
@@ -29,6 +29,7 @@
#include "net/http/http_server_properties.h"
#include "net/http/http_transaction_factory.h"
#include "net/log/net_log.h"
+#include "net/log/net_log_event_type.h"
#include "net/proxy/proxy_config.h"
#include "net/proxy/proxy_retry_info.h"
#include "net/proxy/proxy_service.h"
@@ -246,9 +247,9 @@ std::unique_ptr<base::DictionaryValue> GetNetConstants() {
{
std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
- dict->SetInteger("PHASE_BEGIN", NetLog::PHASE_BEGIN);
- dict->SetInteger("PHASE_END", NetLog::PHASE_END);
- dict->SetInteger("PHASE_NONE", NetLog::PHASE_NONE);
+ dict->SetInteger("PHASE_BEGIN", static_cast<int>(NetLogEventPhase::BEGIN));
+ dict->SetInteger("PHASE_END", static_cast<int>(NetLogEventPhase::END));
+ dict->SetInteger("PHASE_NONE", static_cast<int>(NetLogEventPhase::NONE));
constants_dict->Set("logEventPhase", std::move(dict));
}
@@ -536,8 +537,8 @@ NET_EXPORT void CreateNetLogEntriesForActiveObjects(
// Note that passing the hardcoded NetLogCaptureMode::Default() below is
// fine, since GetRequestStateAsValue() ignores the capture mode.
NetLog::EntryData entry_data(
- NetLog::TYPE_REQUEST_ALIVE, request->net_log().source(),
- NetLog::PHASE_BEGIN, request->creation_time(), &callback);
+ NetLogEventType::REQUEST_ALIVE, request->net_log().source(),
+ NetLogEventPhase::BEGIN, request->creation_time(), &callback);
NetLog::Entry entry(&entry_data, NetLogCaptureMode::Default());
observer->OnAddEntry(entry);
}
« no previous file with comments | « net/log/net_log_unittest.cc ('k') | net/log/test_net_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698