| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/media_galleries/linux/mtp_device_task_helper.h" | 5 #include "chrome/browser/media_galleries/linux/mtp_device_task_helper.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 const bool error) const { | 379 const bool error) const { |
| 380 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 380 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 381 if (error) { | 381 if (error) { |
| 382 content::BrowserThread::PostTask( | 382 content::BrowserThread::PostTask( |
| 383 content::BrowserThread::IO, FROM_HERE, | 383 content::BrowserThread::IO, FROM_HERE, |
| 384 base::Bind(error_callback, base::File::FILE_ERROR_FAILED)); | 384 base::Bind(error_callback, base::File::FILE_ERROR_FAILED)); |
| 385 return; | 385 return; |
| 386 } | 386 } |
| 387 | 387 |
| 388 content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE, | 388 content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE, |
| 389 base::Bind(success_callback)); | 389 success_callback); |
| 390 } | 390 } |
| 391 | 391 |
| 392 void MTPDeviceTaskHelper::HandleDeviceError( | 392 void MTPDeviceTaskHelper::HandleDeviceError( |
| 393 const ErrorCallback& error_callback, | 393 const ErrorCallback& error_callback, |
| 394 base::File::Error error) const { | 394 base::File::Error error) const { |
| 395 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 395 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 396 content::BrowserThread::PostTask(content::BrowserThread::IO, | 396 content::BrowserThread::PostTask(content::BrowserThread::IO, |
| 397 FROM_HERE, | 397 FROM_HERE, |
| 398 base::Bind(error_callback, error)); | 398 base::Bind(error_callback, error)); |
| 399 } | 399 } |
| OLD | NEW |