Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/storage_monitor/storage_monitor_chromeos.h" | 5 #include "components/storage_monitor/storage_monitor_chromeos.h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 72 device_label, | 72 device_label, |
| 73 base::UTF8ToUTF16(disk->vendor_name()), | 73 base::UTF8ToUTF16(disk->vendor_name()), |
| 74 base::UTF8ToUTF16(disk->product_name()), | 74 base::UTF8ToUTF16(disk->product_name()), |
| 75 disk->total_size_in_bytes()); | 75 disk->total_size_in_bytes()); |
| 76 return true; | 76 return true; |
| 77 } | 77 } |
| 78 | 78 |
| 79 // Returns whether the mount point in |mount_info| is a media device or not. | 79 // Returns whether the mount point in |mount_info| is a media device or not. |
| 80 bool CheckMountedPathOnFileThread( | 80 bool CheckMountedPathOnFileThread( |
| 81 const DiskMountManager::MountPointInfo& mount_info) { | 81 const DiskMountManager::MountPointInfo& mount_info) { |
| 82 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE)); | 82 DCHECK_CURRENTLY_ON(BrowserThread::FILE); |
|
Cait (Slow)
2015/04/23 00:02:37
content::BrowserThread::FILE?
Mostyn Bramley-Moore
2015/04/23 07:43:16
The other DCHECK_CURRENTLY_ON's in this file don't
Mostyn Bramley-Moore
2015/04/23 08:15:09
Looks like it is needed after all- fixed in the la
| |
| 83 return MediaStorageUtil::HasDcim(base::FilePath(mount_info.mount_path)); | 83 return MediaStorageUtil::HasDcim(base::FilePath(mount_info.mount_path)); |
| 84 } | 84 } |
| 85 | 85 |
| 86 } // namespace | 86 } // namespace |
| 87 | 87 |
| 88 using content::BrowserThread; | 88 using content::BrowserThread; |
| 89 | 89 |
| 90 StorageMonitorCros::StorageMonitorCros() | 90 StorageMonitorCros::StorageMonitorCros() |
| 91 : weak_ptr_factory_(this) { | 91 : weak_ptr_factory_(this) { |
| 92 } | 92 } |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 297 mount_map_.insert(std::make_pair(mount_info.mount_path, info)); | 297 mount_map_.insert(std::make_pair(mount_info.mount_path, info)); |
| 298 | 298 |
| 299 receiver()->ProcessAttach(info); | 299 receiver()->ProcessAttach(info); |
| 300 } | 300 } |
| 301 | 301 |
| 302 StorageMonitor* StorageMonitor::CreateInternal() { | 302 StorageMonitor* StorageMonitor::CreateInternal() { |
| 303 return new StorageMonitorCros(); | 303 return new StorageMonitorCros(); |
| 304 } | 304 } |
| 305 | 305 |
| 306 } // namespace storage_monitor | 306 } // namespace storage_monitor |
| OLD | NEW |