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

Unified Diff: chrome/browser/chromeos/drive/file_system_util.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/file_system_util.cc
diff --git a/chrome/browser/chromeos/drive/file_system_util.cc b/chrome/browser/chromeos/drive/file_system_util.cc
index 60c81daf87581472e88e50001cb18359129df112..6a351ff6b1fb4f0b87866ef3dcb2478c1b40612f 100644
--- a/chrome/browser/chromeos/drive/file_system_util.cc
+++ b/chrome/browser/chromeos/drive/file_system_util.cc
@@ -133,7 +133,7 @@ base::FilePath GetDriveMountPointPath(Profile* profile) {
}
FileSystemInterface* GetFileSystemByProfile(Profile* profile) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DriveIntegrationService* integration_service =
GetIntegrationServiceByProfile(profile);
@@ -141,7 +141,7 @@ FileSystemInterface* GetFileSystemByProfile(Profile* profile) {
}
FileSystemInterface* GetFileSystemByProfileId(void* profile_id) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// |profile_id| needs to be checked with ProfileManager::IsValidProfile
// before using it.
@@ -152,7 +152,7 @@ FileSystemInterface* GetFileSystemByProfileId(void* profile_id) {
}
DriveAppRegistry* GetDriveAppRegistryByProfile(Profile* profile) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DriveIntegrationService* integration_service =
GetIntegrationServiceByProfile(profile);
@@ -162,7 +162,7 @@ DriveAppRegistry* GetDriveAppRegistryByProfile(Profile* profile) {
}
DriveServiceInterface* GetDriveServiceByProfile(Profile* profile) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DriveIntegrationService* integration_service =
GetIntegrationServiceByProfile(profile);
@@ -192,7 +192,7 @@ base::FilePath ExtractDrivePath(const base::FilePath& path) {
}
Profile* ExtractProfileFromPath(const base::FilePath& path) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
const std::vector<Profile*>& profiles =
g_browser_process->profile_manager()->GetLoadedProfiles();
@@ -268,7 +268,7 @@ std::string NormalizeFileName(const std::string& input) {
void PrepareWritableFileAndRun(Profile* profile,
const base::FilePath& path,
const PrepareWritableFileCallback& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(!callback.is_null());
FileSystemInterface* file_system = GetFileSystemByProfile(profile);
@@ -287,7 +287,7 @@ void PrepareWritableFileAndRun(Profile* profile,
void EnsureDirectoryExists(Profile* profile,
const base::FilePath& directory,
const FileOperationCallback& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(!callback.is_null());
if (IsUnderDriveMountPoint(directory)) {
FileSystemInterface* file_system = GetFileSystemByProfile(profile);
@@ -325,7 +325,7 @@ std::string ReadResourceIdFromGDocFile(const base::FilePath& file_path) {
}
bool IsDriveEnabledForProfile(Profile* profile) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (!chromeos::IsProfileAssociatedWithGaiaAccount(profile))
return false;
« no previous file with comments | « chrome/browser/chromeos/drive/file_system/truncate_operation.cc ('k') | chrome/browser/chromeos/drive/file_write_watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698