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

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

Issue 1059843002: Refactor NetLog::LogLevel --> NetLogCaptureMode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update copyright 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 | « no previous file | chrome/browser/net/net_log_temp_file.h » ('j') | net/disk_cache/blockfile/sparse_control.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/chrome_net_log.cc
diff --git a/chrome/browser/net/chrome_net_log.cc b/chrome/browser/net/chrome_net_log.cc
index 9cb6aac59784f58d296bbf1a9d05044d22202a3c..b0cbbe8696de0770e78a47a76e7eae1de5fde0fb 100644
--- a/chrome/browser/net/chrome_net_log.cc
+++ b/chrome/browser/net/chrome_net_log.cc
@@ -51,10 +51,17 @@ ChromeNetLog::ChromeNetLog()
command_line->GetSwitchValueASCII(switches::kNetLogLevel);
int command_line_log_level;
if (base::StringToInt(log_level_string, &command_line_log_level) &&
- command_line_log_level >= LOG_ALL &&
- command_line_log_level <= LOG_NONE) {
- net_log_logger_->set_log_level(
- static_cast<LogLevel>(command_line_log_level));
+ command_line_log_level >= net::NetLogCaptureMode::NONE &&
eroman 2015/04/09 00:08:19 Changes here
+ command_line_log_level <= net::NetLogCaptureMode::ALL) {
+ // TODO(eroman): The level is inverted to maintain backwards
+ // compatibility (the log level values used to increase in the
+ // opposite direction).
+ command_line_log_level =
+ net::NetLogCaptureMode::ALL - command_line_log_level;
+
+ net_log_logger_->set_capture_mode(
+ net::NetLogCaptureMode(static_cast<net::NetLogCaptureMode::Level>(
+ command_line_log_level)));
}
}
net_log_logger_->StartObserving(this, file.Pass(), constants.get(),
« no previous file with comments | « no previous file | chrome/browser/net/net_log_temp_file.h » ('j') | net/disk_cache/blockfile/sparse_control.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698