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

Unified Diff: components/storage_monitor/image_capture_device.mm

Issue 1043013002: favor DCHECK_CURRENTLY_ON for better logs in components/ (part 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: content namespace needed after all Created 5 years, 8 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: components/storage_monitor/image_capture_device.mm
diff --git a/components/storage_monitor/image_capture_device.mm b/components/storage_monitor/image_capture_device.mm
index 1008bfd435cb908a2efbbf56bcb5207146f82fcb..29285d938cad61058bfd9d70103ba9abd953a541 100644
--- a/components/storage_monitor/image_capture_device.mm
+++ b/components/storage_monitor/image_capture_device.mm
@@ -13,7 +13,7 @@ namespace {
base::File::Error RenameFile(const base::FilePath& downloaded_filename,
const base::FilePath& desired_filename) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::FILE);
bool success = base::ReplaceFile(downloaded_filename, desired_filename, NULL);
return success ? base::File::FILE_OK : base::File::FILE_ERROR_NOT_FOUND;
}
@@ -22,7 +22,7 @@ void ReturnRenameResultToListener(
base::WeakPtr<ImageCaptureDeviceListener> listener,
const std::string& name,
const base::File::Error& result) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
if (listener)
listener->DownloadedFile(name, result);
}
@@ -75,18 +75,18 @@ base::FilePath PathForCameraItem(ICCameraItem* item) {
- (void)setListener:(base::WeakPtr<storage_monitor::ImageCaptureDeviceListener>)
listener {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
listener_ = listener;
}
- (void)open {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
DCHECK(listener_);
[camera_ requestOpenSession];
}
- (void)close {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
closing_ = true;
[camera_ cancelDownload];
[camera_ requestCloseSession];
@@ -100,7 +100,7 @@ base::FilePath PathForCameraItem(ICCameraItem* item) {
- (void)downloadFile:(const std::string&)name
localPath:(const base::FilePath&)localPath {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
// Find the file with that name and start download.
for (ICCameraItem* item in [camera_ mediaFiles]) {

Powered by Google App Engine
This is Rietveld 408576698