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_info.h" | 5 #include "chrome/browser/storage_monitor/storage_info.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 | 8 |
9 namespace chrome { | 9 namespace chrome { |
10 | 10 |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 bool StorageInfo::IsMassStorageDevice(const std::string& device_id) { | 123 bool StorageInfo::IsMassStorageDevice(const std::string& device_id) { |
124 Type type; | 124 Type type; |
125 return CrackDeviceId(device_id, &type, NULL) && | 125 return CrackDeviceId(device_id, &type, NULL) && |
126 (type == REMOVABLE_MASS_STORAGE_WITH_DCIM || | 126 (type == REMOVABLE_MASS_STORAGE_WITH_DCIM || |
127 type == REMOVABLE_MASS_STORAGE_NO_DCIM || | 127 type == REMOVABLE_MASS_STORAGE_NO_DCIM || |
128 type == FIXED_MASS_STORAGE || | 128 type == FIXED_MASS_STORAGE || |
129 type == ITUNES || | 129 type == ITUNES || |
130 type == PICASA); | 130 type == PICASA); |
131 } | 131 } |
132 | 132 |
| 133 // static |
| 134 bool StorageInfo::IsITunesDevice(const std::string& device_id) { |
| 135 Type type; |
| 136 return CrackDeviceId(device_id, &type, NULL) && type == ITUNES; |
| 137 } |
| 138 |
| 139 // static |
| 140 bool StorageInfo::IsPicasaDevice(const std::string& device_id) { |
| 141 Type type; |
| 142 return CrackDeviceId(device_id, &type, NULL) && type == PICASA; |
| 143 } |
| 144 |
133 } // namespace chrome | 145 } // namespace chrome |
OLD | NEW |