bool GetStorageInfoOnUIThread(const base::string16& storage_path,
base::string16* pnp_device_id,
base::string16* storage_object_id) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
DCHECK(!storage_path.empty());
DCHECK(pnp_device_id);
DCHECK(storage_object_id);
base::string16* pnp_device_id,
base::string16* storage_object_id,
bool succeeded) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
DCHECK(pnp_device_id);
DCHECK(storage_object_id);
if (!succeeded)
void CreateMTPDeviceAsyncDelegate(
const base::string16& device_location,
const CreateMTPDeviceAsyncDelegateCallback& callback) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
DCHECK(!device_location.empty());
base::string16* pnp_device_id = new base::string16;
base::string16* storage_object_id = new base::string16;
: pnp_device_id(pnp_device_id),
registered_device_path(registered_device_path),
storage_object_id(storage_object_id) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
}
MTPDeviceDelegateImplWin::PendingTaskInfo::PendingTaskInfo(
media_task_runner_(MediaFileSystemBackend::MediaTaskRunner()),
task_in_progress_(false),
weak_ptr_factory_(this) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
DCHECK(!registered_device_path.empty());
DCHECK(!pnp_device_id.empty());
DCHECK(!storage_object_id.empty());
}
MTPDeviceDelegateImplWin::~MTPDeviceDelegateImplWin() {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
}
void MTPDeviceDelegateImplWin::GetFileInfo(
const base::FilePath& file_path,
const GetFileInfoSuccessCallback& success_callback,
const ErrorCallback& error_callback) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
DCHECK(!file_path.empty());
base::File::Info* file_info = new base::File::Info;
EnsureInitAndRunTask(
const base::FilePath& root,
const ReadDirectorySuccessCallback& success_callback,
const ErrorCallback& error_callback) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
DCHECK(!root.empty());
fileapi::AsyncFileUtil::EntryList* entries =
new fileapi::AsyncFileUtil::EntryList;
const base::FilePath& snapshot_file_path,
const CreateSnapshotFileSuccessCallback& success_callback,
const ErrorCallback& error_callback) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
DCHECK(!device_file_path.empty());
DCHECK(!snapshot_file_path.empty());
scoped_ptr<SnapshotFileDetails> file_details(
}
void MTPDeviceDelegateImplWin::CancelPendingTasksAndDeleteDelegate() {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
PortableDeviceMapService::GetInstance()->MarkPortableDeviceForDeletion(
storage_device_info_.registered_device_path);
media_task_runner_->PostTask(
void MTPDeviceDelegateImplWin::EnsureInitAndRunTask(
const PendingTaskInfo& task_info) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
if ((init_state_ == INITIALIZED) && !task_in_progress_) {
DCHECK(pending_tasks_.empty());
DCHECK(!current_snapshot_details_.get());
}
void MTPDeviceDelegateImplWin::OnInitCompleted(bool succeeded) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
init_state_ = succeeded ? INITIALIZED : UNINITIALIZED;
task_in_progress_ = false;
ProcessNextPendingRequest();
const ErrorCallback& error_callback,
base::File::Info* file_info,
base::File::Error error) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
DCHECK(file_info);
if (error == base::File::FILE_OK)
success_callback.Run(*file_info);
const ErrorCallback& error_callback,
fileapi::AsyncFileUtil::EntryList* file_list,
base::File::Error error) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
DCHECK(file_list);
if (error == base::File::FILE_OK)
success_callback.Run(*file_list, false /*no more entries*/);
void MTPDeviceDelegateImplWin::OnGetFileStream(
scoped_ptr<SnapshotFileDetails> file_details,
base::File::Error error) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
DCHECK(file_details);
DCHECK(!file_details->request_info().device_file_path.empty());
DCHECK(!file_details->request_info().snapshot_file_path.empty());
void MTPDeviceDelegateImplWin::OnWroteDataChunkIntoSnapshotFile(
const base::FilePath& snapshot_file_path,
DWORD bytes_written) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
DCHECK(!snapshot_file_path.empty());
if (!current_snapshot_details_.get())
return;