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

Unified Diff: chrome/browser/chromeos/memory/low_memory_observer.cc

Issue 1036723003: favor DCHECK_CURRENTLY_ON for better logs in chrome/browser/chromeos/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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: chrome/browser/chromeos/memory/low_memory_observer.cc
diff --git a/chrome/browser/chromeos/memory/low_memory_observer.cc b/chrome/browser/chromeos/memory/low_memory_observer.cc
index f402225c90277dea797162c85766681032d3978a..fbbb3fd7c7a5bb37850443cdabbddbdabacd1771 100644
--- a/chrome/browser/chromeos/memory/low_memory_observer.cc
+++ b/chrome/browser/chromeos/memory/low_memory_observer.cc
@@ -117,7 +117,7 @@ void LowMemoryObserverImpl::StartObservingOnFileThread() {
DCHECK_LE(file_descriptor_, 0)
<< "Attempted to start observation when it was already started.";
DCHECK(watcher_.get() == NULL);
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
DCHECK(base::MessageLoopForIO::current());
file_descriptor_ = ::open(kLowMemFile, O_RDONLY);
@@ -135,7 +135,7 @@ void LowMemoryObserverImpl::StopObservingOnFileThread() {
// If StartObserving failed, StopObserving will still get called.
timer_.Stop();
if (file_descriptor_ >= 0) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
watcher_.reset(NULL);
::close(file_descriptor_);
file_descriptor_ = -1;
@@ -151,7 +151,7 @@ void LowMemoryObserverImpl::ScheduleNextObservation() {
void LowMemoryObserverImpl::StartWatchingDescriptor() {
DCHECK(watcher_.get());
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
DCHECK(base::MessageLoopForIO::current());
if (file_descriptor_ < 0)
return;
« no previous file with comments | « chrome/browser/chromeos/login/wizard_controller.cc ('k') | chrome/browser/chromeos/memory/oom_priority_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698