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

Unified Diff: chrome/browser/net/net_log_temp_file.cc

Issue 1059843002: Refactor NetLog::LogLevel --> NetLogCaptureMode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again to fix a merge conflict Created 5 years, 8 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 | « chrome/browser/net/net_log_temp_file.h ('k') | chrome/browser/net/net_log_temp_file_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/net_log_temp_file.cc
diff --git a/chrome/browser/net/net_log_temp_file.cc b/chrome/browser/net/net_log_temp_file.cc
index 3674b2b5475b5b3c87b41f6fd1f515d025a5649e..99f29aa3775e1aa615eb1b2bca12a88e70fad4cc 100644
--- a/chrome/browser/net/net_log_temp_file.cc
+++ b/chrome/browser/net/net_log_temp_file.cc
@@ -93,19 +93,20 @@ base::DictionaryValue* NetLogTempFile::GetState() {
return dict;
}
-net::NetLog::LogLevel NetLogTempFile::GetLogLevelForLogType(LogType log_type) {
+net::NetLogCaptureMode NetLogTempFile::GetCaptureModeForLogType(
+ LogType log_type) {
switch (log_type) {
case LOG_TYPE_LOG_BYTES:
- return net::NetLog::LOG_ALL;
+ return net::NetLogCaptureMode::IncludeSocketBytes();
case LOG_TYPE_NORMAL:
- return net::NetLog::LOG_ALL_BUT_BYTES;
+ return net::NetLogCaptureMode::IncludeCookiesAndCredentials();
case LOG_TYPE_STRIP_PRIVATE_DATA:
- return net::NetLog::LOG_STRIP_PRIVATE_DATA;
+ return net::NetLogCaptureMode::Default();
case LOG_TYPE_NONE:
case LOG_TYPE_UNKNOWN:
NOTREACHED();
}
- return net::NetLog::LOG_STRIP_PRIVATE_DATA;
+ return net::NetLogCaptureMode::Default();
}
bool NetLogTempFile::EnsureInit() {
@@ -145,7 +146,7 @@ void NetLogTempFile::StartNetLog(LogType log_type) {
scoped_ptr<base::Value> constants(NetInternalsUI::GetConstants());
net_log_logger_.reset(new net::WriteToFileNetLogObserver());
- net_log_logger_->set_log_level(GetLogLevelForLogType(log_type));
+ net_log_logger_->set_capture_mode(GetCaptureModeForLogType(log_type));
net_log_logger_->StartObserving(chrome_net_log_, file.Pass(), constants.get(),
nullptr);
}
« no previous file with comments | « chrome/browser/net/net_log_temp_file.h ('k') | chrome/browser/net/net_log_temp_file_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698