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

Side by Side Diff: chrome/browser/system_monitor/disk_info_mac.mm

Issue 11817036: Revert 175938 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/system_monitor/disk_info_mac.h" 5 #include "chrome/browser/system_monitor/disk_info_mac.h"
6 6
7 #include "base/mac/foundation_util.h" 7 #include "base/mac/foundation_util.h"
8 #include "base/sys_string_conversions.h" 8 #include "base/sys_string_conversions.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/system_monitor/media_device_notifications_utils.h" 10 #include "chrome/browser/system_monitor/media_device_notifications_utils.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 bool is_removable = is_removable_ref && CFBooleanGetValue(is_removable_ref); 107 bool is_removable = is_removable_ref && CFBooleanGetValue(is_removable_ref);
108 // Checking for DCIM only matters on removable devices. 108 // Checking for DCIM only matters on removable devices.
109 bool has_dcim = is_removable && IsMediaDevice(info.mount_point_.value()); 109 bool has_dcim = is_removable && IsMediaDevice(info.mount_point_.value());
110 info.type_ = GetDeviceType(is_removable, has_dcim); 110 info.type_ = GetDeviceType(is_removable, has_dcim);
111 if (!unique_id.empty()) 111 if (!unique_id.empty())
112 info.device_id_ = MediaStorageUtil::MakeDeviceId(info.type_, unique_id); 112 info.device_id_ = MediaStorageUtil::MakeDeviceId(info.type_, unique_id);
113 113
114 return info; 114 return info;
115 } 115 }
116 116
117 // TODO(gbillock): Make sure this gets test coverage.
118 // static
119 DiskInfoMac DiskInfoMac::BuildDiskInfoFromICDevice(std::string device_id,
120 string16 device_name,
121 FilePath mount_point) {
122 DiskInfoMac info;
123 info.device_id_ = device_id;
124 info.device_name_ = device_name;
125 info.mount_point_ = mount_point;
126 info.type_ = MediaStorageUtil::MAC_IMAGE_CAPTURE;
127 return info;
128 }
129
117 } // namesapce chrome 130 } // namesapce chrome
OLDNEW
« no previous file with comments | « chrome/browser/system_monitor/disk_info_mac.h ('k') | chrome/browser/system_monitor/image_capture_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698