Index: chrome/browser/chromeos/drive/fileapi/fileapi_worker.cc |
diff --git a/chrome/browser/chromeos/drive/fileapi/fileapi_worker.cc b/chrome/browser/chromeos/drive/fileapi/fileapi_worker.cc |
index eb08c65bb325388a1d8d9ee5417f9422581a3960..ceb34fe47f60201780378b7718dca19c26eb8d4a 100644 |
--- a/chrome/browser/chromeos/drive/fileapi/fileapi_worker.cc |
+++ b/chrome/browser/chromeos/drive/fileapi/fileapi_worker.cc |
@@ -140,7 +140,7 @@ void RunCreateWritableSnapshotFileCallback( |
FileError error, |
const base::FilePath& local_path, |
const base::Closure& close_callback) { |
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
+ DCHECK_CURRENTLY_ON(BrowserThread::UI); |
callback.Run(FileErrorToBaseFileError(error), local_path, close_callback); |
} |
@@ -161,7 +161,7 @@ void OpenFileAfterFileSystemOpenFile(int file_flags, |
FileError error, |
const base::FilePath& local_path, |
const base::Closure& close_callback) { |
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
+ DCHECK_CURRENTLY_ON(BrowserThread::UI); |
if (error != FILE_ERROR_OK) { |
callback.Run(base::File(FileErrorToBaseFileError(error)), base::Closure()); |
@@ -194,7 +194,7 @@ void OpenFileAfterFileSystemOpenFile(int file_flags, |
} // namespace |
FileSystemInterface* GetFileSystemFromUrl(const storage::FileSystemURL& url) { |
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
+ DCHECK_CURRENTLY_ON(BrowserThread::UI); |
Profile* profile = util::ExtractProfileFromPath(url.path()); |
return profile ? util::GetFileSystemByProfile(profile) : NULL; |
@@ -204,7 +204,7 @@ void RunFileSystemCallback( |
const FileSystemGetter& file_system_getter, |
const base::Callback<void(FileSystemInterface*)>& callback, |
const base::Closure& on_error_callback) { |
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
+ DCHECK_CURRENTLY_ON(BrowserThread::UI); |
FileSystemInterface* file_system = file_system_getter.Run(); |
if (!file_system) { |
@@ -219,7 +219,7 @@ void RunFileSystemCallback( |
void GetFileInfo(const base::FilePath& file_path, |
const GetFileInfoCallback& callback, |
FileSystemInterface* file_system) { |
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
+ DCHECK_CURRENTLY_ON(BrowserThread::UI); |
file_system->GetResourceEntry( |
file_path, |
base::Bind(&RunGetFileInfoCallback, callback)); |
@@ -230,7 +230,7 @@ void Copy(const base::FilePath& src_file_path, |
bool preserve_last_modified, |
const StatusCallback& callback, |
FileSystemInterface* file_system) { |
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
+ DCHECK_CURRENTLY_ON(BrowserThread::UI); |
file_system->Copy(src_file_path, dest_file_path, preserve_last_modified, |
base::Bind(&RunStatusCallbackByFileError, callback)); |
} |
@@ -239,7 +239,7 @@ void Move(const base::FilePath& src_file_path, |
const base::FilePath& dest_file_path, |
const StatusCallback& callback, |
FileSystemInterface* file_system) { |
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
+ DCHECK_CURRENTLY_ON(BrowserThread::UI); |
file_system->Move(src_file_path, dest_file_path, |
base::Bind(&RunStatusCallbackByFileError, callback)); |
} |
@@ -248,7 +248,7 @@ void CopyInForeignFile(const base::FilePath& src_foreign_file_path, |
const base::FilePath& dest_file_path, |
const StatusCallback& callback, |
FileSystemInterface* file_system) { |
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
+ DCHECK_CURRENTLY_ON(BrowserThread::UI); |
file_system->TransferFileFromLocalToRemote( |
src_foreign_file_path, dest_file_path, |
base::Bind(&RunStatusCallbackByFileError, callback)); |
@@ -257,7 +257,7 @@ void CopyInForeignFile(const base::FilePath& src_foreign_file_path, |
void ReadDirectory(const base::FilePath& file_path, |
const ReadDirectoryCallback& callback, |
FileSystemInterface* file_system) { |
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
+ DCHECK_CURRENTLY_ON(BrowserThread::UI); |
file_system->ReadDirectory( |
file_path, |
base::Bind(&RunReadDirectoryCallbackWithEntries, callback), |
@@ -268,7 +268,7 @@ void Remove(const base::FilePath& file_path, |
bool is_recursive, |
const StatusCallback& callback, |
FileSystemInterface* file_system) { |
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
+ DCHECK_CURRENTLY_ON(BrowserThread::UI); |
file_system->Remove(file_path, is_recursive, |
base::Bind(&RunStatusCallbackByFileError, callback)); |
} |
@@ -278,7 +278,7 @@ void CreateDirectory(const base::FilePath& file_path, |
bool is_recursive, |
const StatusCallback& callback, |
FileSystemInterface* file_system) { |
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
+ DCHECK_CURRENTLY_ON(BrowserThread::UI); |
file_system->CreateDirectory( |
file_path, is_exclusive, is_recursive, |
base::Bind(&RunStatusCallbackByFileError, callback)); |
@@ -288,7 +288,7 @@ void CreateFile(const base::FilePath& file_path, |
bool is_exclusive, |
const StatusCallback& callback, |
FileSystemInterface* file_system) { |
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
+ DCHECK_CURRENTLY_ON(BrowserThread::UI); |
file_system->CreateFile(file_path, is_exclusive, |
std::string(), // no mime type; guess from file_path |
base::Bind(&RunStatusCallbackByFileError, callback)); |
@@ -298,7 +298,7 @@ void Truncate(const base::FilePath& file_path, |
int64 length, |
const StatusCallback& callback, |
FileSystemInterface* file_system) { |
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
+ DCHECK_CURRENTLY_ON(BrowserThread::UI); |
file_system->TruncateFile( |
file_path, length, |
base::Bind(&RunStatusCallbackByFileError, callback)); |
@@ -307,7 +307,7 @@ void Truncate(const base::FilePath& file_path, |
void CreateSnapshotFile(const base::FilePath& file_path, |
const CreateSnapshotFileCallback& callback, |
FileSystemInterface* file_system) { |
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
+ DCHECK_CURRENTLY_ON(BrowserThread::UI); |
file_system->GetFile(file_path, |
base::Bind(&RunCreateSnapshotFileCallback, callback)); |
} |
@@ -316,7 +316,7 @@ void CreateWritableSnapshotFile( |
const base::FilePath& file_path, |
const CreateWritableSnapshotFileCallback& callback, |
FileSystemInterface* file_system) { |
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
+ DCHECK_CURRENTLY_ON(BrowserThread::UI); |
file_system->OpenFile( |
file_path, |
OPEN_FILE, |
@@ -328,7 +328,7 @@ void OpenFile(const base::FilePath& file_path, |
int file_flags, |
const OpenFileCallback& callback, |
FileSystemInterface* file_system) { |
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
+ DCHECK_CURRENTLY_ON(BrowserThread::UI); |
// Returns an error if any unsupported flag is found. |
if (file_flags & ~(base::File::FLAG_OPEN | |
@@ -359,7 +359,7 @@ void TouchFile(const base::FilePath& file_path, |
const base::Time& last_modified_time, |
const StatusCallback& callback, |
FileSystemInterface* file_system) { |
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
+ DCHECK_CURRENTLY_ON(BrowserThread::UI); |
file_system->TouchFile(file_path, last_access_time, last_modified_time, |
base::Bind(&RunStatusCallbackByFileError, callback)); |