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

Unified Diff: chrome/browser/chromeos/drive/drive_integration_service.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/drive/drive_integration_service.cc
diff --git a/chrome/browser/chromeos/drive/drive_integration_service.cc b/chrome/browser/chromeos/drive/drive_integration_service.cc
index 293fd5f5d5ab7577767dee60ac3c9eec6e21e4cb..eb05e35e180c1d988216ebad395d6917309c55c5 100644
--- a/chrome/browser/chromeos/drive/drive_integration_service.cc
+++ b/chrome/browser/chromeos/drive/drive_integration_service.cc
@@ -219,7 +219,7 @@ DriveIntegrationService::DriveIntegrationService(
cache_root_directory_(!test_cache_root.empty() ?
test_cache_root : util::GetCacheRootPath(profile)),
weak_ptr_factory_(this) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(profile && !profile->IsOffTheRecord());
logger_.reset(new EventLogger);
@@ -281,11 +281,11 @@ DriveIntegrationService::DriveIntegrationService(
}
DriveIntegrationService::~DriveIntegrationService() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
}
void DriveIntegrationService::Shutdown() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
weak_ptr_factory_.InvalidateWeakPtrs();
@@ -357,13 +357,13 @@ bool DriveIntegrationService::IsMounted() const {
void DriveIntegrationService::AddObserver(
DriveIntegrationServiceObserver* observer) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
observers_.AddObserver(observer);
}
void DriveIntegrationService::RemoveObserver(
DriveIntegrationServiceObserver* observer) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
observers_.RemoveObserver(observer);
}
@@ -382,7 +382,7 @@ void DriveIntegrationService::OnPushNotificationEnabled(bool enabled) {
void DriveIntegrationService::ClearCacheAndRemountFileSystem(
const base::Callback<void(bool)>& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(!callback.is_null());
if (state_ != INITIALIZED) {
@@ -405,7 +405,7 @@ void DriveIntegrationService::ClearCacheAndRemountFileSystem(
void DriveIntegrationService::AddBackDriveMountPoint(
const base::Callback<void(bool)>& callback,
FileError error) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(!callback.is_null());
state_ = error == FILE_ERROR_OK ? INITIALIZED : NOT_INITIALIZED;
@@ -421,7 +421,7 @@ void DriveIntegrationService::AddBackDriveMountPoint(
}
void DriveIntegrationService::AddDriveMountPoint() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK_EQ(INITIALIZED, state_);
DCHECK(enabled_);
@@ -447,7 +447,7 @@ void DriveIntegrationService::AddDriveMountPoint() {
}
void DriveIntegrationService::RemoveDriveMountPoint() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (!mount_point_name_.empty()) {
job_list()->CancelAllJobs();
@@ -465,7 +465,7 @@ void DriveIntegrationService::RemoveDriveMountPoint() {
}
void DriveIntegrationService::Initialize() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK_EQ(NOT_INITIALIZED, state_);
DCHECK(enabled_);
@@ -486,7 +486,7 @@ void DriveIntegrationService::Initialize() {
void DriveIntegrationService::InitializeAfterMetadataInitialized(
FileError error) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK_EQ(INITIALIZING, state_);
SigninManagerBase* signin_manager =
« no previous file with comments | « chrome/browser/chromeos/drive/drive_file_stream_reader.cc ('k') | chrome/browser/chromeos/drive/fake_file_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698