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

Unified Diff: components/storage_monitor/mtab_watcher_linux.cc

Issue 1043013002: favor DCHECK_CURRENTLY_ON for better logs in components/ (part 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: content namespace needed after all 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
Index: components/storage_monitor/mtab_watcher_linux.cc
diff --git a/components/storage_monitor/mtab_watcher_linux.cc b/components/storage_monitor/mtab_watcher_linux.cc
index 00a9d0cc4842ba276c1d669819e1cb94258983cb..31dda98606c3374e47c5562376adcdad1fb2f07d 100644
--- a/components/storage_monitor/mtab_watcher_linux.cc
+++ b/components/storage_monitor/mtab_watcher_linux.cc
@@ -38,7 +38,7 @@ MtabWatcherLinux::MtabWatcherLinux(const base::FilePath& mtab_path,
: mtab_path_(mtab_path),
delegate_(delegate),
weak_ptr_factory_(this) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::FILE);
bool ret = file_watcher_.Watch(
mtab_path_, false,
base::Bind(&MtabWatcherLinux::OnFilePathChanged,
@@ -52,11 +52,11 @@ MtabWatcherLinux::MtabWatcherLinux(const base::FilePath& mtab_path,
}
MtabWatcherLinux::~MtabWatcherLinux() {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::FILE);
}
void MtabWatcherLinux::ReadMtab() const {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::FILE);
FILE* fp = setmntent(mtab_path_.value().c_str(), "r");
if (!fp)
@@ -87,7 +87,7 @@ void MtabWatcherLinux::ReadMtab() const {
void MtabWatcherLinux::OnFilePathChanged(
const base::FilePath& path, bool error) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::FILE);
if (path != mtab_path_) {
// This cannot happen unless FilePathWatcher is buggy. Just ignore this
« no previous file with comments | « components/storage_monitor/image_capture_device.mm ('k') | components/storage_monitor/portable_device_watcher_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698