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 { | |
10 | |
11 namespace { | 9 namespace { |
12 | 10 |
13 // Prefix constants for different device id spaces. | 11 // Prefix constants for different device id spaces. |
14 const char kRemovableMassStorageWithDCIMPrefix[] = "dcim:"; | 12 const char kRemovableMassStorageWithDCIMPrefix[] = "dcim:"; |
15 const char kRemovableMassStorageNoDCIMPrefix[] = "nodcim:"; | 13 const char kRemovableMassStorageNoDCIMPrefix[] = "nodcim:"; |
16 const char kFixedMassStoragePrefix[] = "path:"; | 14 const char kFixedMassStoragePrefix[] = "path:"; |
17 const char kMtpPtpPrefix[] = "mtp:"; | 15 const char kMtpPtpPrefix[] = "mtp:"; |
18 const char kMacImageCapturePrefix[] = "ic:"; | 16 const char kMacImageCapturePrefix[] = "ic:"; |
19 const char kITunesPrefix[] = "itunes:"; | 17 const char kITunesPrefix[] = "itunes:"; |
20 const char kPicasaPrefix[] = "picasa:"; | 18 const char kPicasaPrefix[] = "picasa:"; |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 bool StorageInfo::IsITunesDevice(const std::string& device_id) { | 132 bool StorageInfo::IsITunesDevice(const std::string& device_id) { |
135 Type type; | 133 Type type; |
136 return CrackDeviceId(device_id, &type, NULL) && type == ITUNES; | 134 return CrackDeviceId(device_id, &type, NULL) && type == ITUNES; |
137 } | 135 } |
138 | 136 |
139 // static | 137 // static |
140 bool StorageInfo::IsPicasaDevice(const std::string& device_id) { | 138 bool StorageInfo::IsPicasaDevice(const std::string& device_id) { |
141 Type type; | 139 Type type; |
142 return CrackDeviceId(device_id, &type, NULL) && type == PICASA; | 140 return CrackDeviceId(device_id, &type, NULL) && type == PICASA; |
143 } | 141 } |
144 | |
145 } // namespace chrome | |
OLD | NEW |