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

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

Issue 1117613003: [chrome/browser/net] favor DCHECK_CURRENTLY_ON for better logs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_error_tab_helper.cc ('k') | chrome/browser/net/net_pref_observer.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 35a170fc6c28d9d0de13db92f6b9d9efeee2565a..0d2400f8a8466ba0ff8a6728d476a09d8eae119c 100644
--- a/chrome/browser/net/net_log_temp_file.cc
+++ b/chrome/browser/net/net_log_temp_file.cc
@@ -27,7 +27,7 @@ NetLogTempFile::~NetLogTempFile() {
}
void NetLogTempFile::ProcessCommand(Command command) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE_USER_BLOCKING));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE_USER_BLOCKING);
if (!EnsureInit())
return;
@@ -51,7 +51,7 @@ void NetLogTempFile::ProcessCommand(Command command) {
}
base::DictionaryValue* NetLogTempFile::GetState() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE_USER_BLOCKING));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE_USER_BLOCKING);
base::DictionaryValue* dict = new base::DictionaryValue;
EnsureInit();
@@ -110,7 +110,7 @@ net::NetLogCaptureMode NetLogTempFile::GetCaptureModeForLogType(
}
bool NetLogTempFile::EnsureInit() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE_USER_BLOCKING));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE_USER_BLOCKING);
if (state_ != STATE_UNINITIALIZED)
return true;
@@ -127,7 +127,7 @@ bool NetLogTempFile::EnsureInit() {
}
void NetLogTempFile::StartNetLog(LogType log_type) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE_USER_BLOCKING));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE_USER_BLOCKING);
if (state_ == STATE_LOGGING)
return;
@@ -152,7 +152,7 @@ void NetLogTempFile::StartNetLog(LogType log_type) {
}
void NetLogTempFile::StopNetLog() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE_USER_BLOCKING));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE_USER_BLOCKING);
if (state_ != STATE_LOGGING)
return;
@@ -162,7 +162,7 @@ void NetLogTempFile::StopNetLog() {
}
bool NetLogTempFile::GetFilePath(base::FilePath* path) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE_USER_BLOCKING));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE_USER_BLOCKING);
if (log_type_ == LOG_TYPE_NONE || state_ == STATE_LOGGING)
return false;
@@ -181,7 +181,7 @@ bool NetLogTempFile::GetFilePath(base::FilePath* path) {
}
bool NetLogTempFile::GetNetExportLog() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE_USER_BLOCKING));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE_USER_BLOCKING);
base::FilePath temp_dir;
if (!GetNetExportLogDirectory(&temp_dir))
return false;
@@ -191,12 +191,12 @@ bool NetLogTempFile::GetNetExportLog() {
}
bool NetLogTempFile::GetNetExportLogDirectory(base::FilePath* path) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE_USER_BLOCKING));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE_USER_BLOCKING);
return base::GetTempDir(path);
}
bool NetLogTempFile::NetExportLogExists() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE_USER_BLOCKING));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE_USER_BLOCKING);
DCHECK(!log_path_.empty());
return base::PathExists(log_path_);
}
« no previous file with comments | « chrome/browser/net/net_error_tab_helper.cc ('k') | chrome/browser/net/net_pref_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698