| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/storage_monitor/storage_monitor_mac.h" | 5 #include "chrome/browser/storage_monitor/storage_monitor_mac.h" |
| 6 | 6 |
| 7 #include "base/mac/foundation_util.h" | 7 #include "base/mac/foundation_util.h" |
| 8 #include "base/mac/mac_util.h" | 8 #include "base/mac/mac_util.h" |
| 9 #include "base/strings/sys_string_conversions.h" | 9 #include "base/strings/sys_string_conversions.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 return base::string16(); | 25 return base::string16(); |
| 26 return base::SysCFStringRefToUTF16(value); | 26 return base::SysCFStringRefToUTF16(value); |
| 27 } | 27 } |
| 28 | 28 |
| 29 base::string16 JoinName(const base::string16& name, | 29 base::string16 JoinName(const base::string16& name, |
| 30 const base::string16& addition) { | 30 const base::string16& addition) { |
| 31 if (addition.empty()) | 31 if (addition.empty()) |
| 32 return name; | 32 return name; |
| 33 if (name.empty()) | 33 if (name.empty()) |
| 34 return addition; | 34 return addition; |
| 35 return name + static_cast<char16>(' ') + addition; | 35 return name + static_cast<base::char16>(' ') + addition; |
| 36 } | 36 } |
| 37 | 37 |
| 38 StorageInfo::Type GetDeviceType(bool is_removable, bool has_dcim) { | 38 StorageInfo::Type GetDeviceType(bool is_removable, bool has_dcim) { |
| 39 if (!is_removable) | 39 if (!is_removable) |
| 40 return StorageInfo::FIXED_MASS_STORAGE; | 40 return StorageInfo::FIXED_MASS_STORAGE; |
| 41 if (has_dcim) | 41 if (has_dcim) |
| 42 return StorageInfo::REMOVABLE_MASS_STORAGE_WITH_DCIM; | 42 return StorageInfo::REMOVABLE_MASS_STORAGE_WITH_DCIM; |
| 43 return StorageInfo::REMOVABLE_MASS_STORAGE_NO_DCIM; | 43 return StorageInfo::REMOVABLE_MASS_STORAGE_NO_DCIM; |
| 44 } | 44 } |
| 45 | 45 |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 *info = it->second; | 378 *info = it->second; |
| 379 return true; | 379 return true; |
| 380 } | 380 } |
| 381 } | 381 } |
| 382 return false; | 382 return false; |
| 383 } | 383 } |
| 384 | 384 |
| 385 StorageMonitor* StorageMonitor::Create() { | 385 StorageMonitor* StorageMonitor::Create() { |
| 386 return new StorageMonitorMac(); | 386 return new StorageMonitorMac(); |
| 387 } | 387 } |
| OLD | NEW |