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

Side by Side Diff: chrome/browser/media_gallery/media_device_notifications_linux.cc

Issue 10876093: Improve the device type constants. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 3 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 // MediaDeviceNotificationsLinux implementation. 5 // MediaDeviceNotificationsLinux implementation.
6 6
7 #include "chrome/browser/media_gallery/media_device_notifications_linux.h" 7 #include "chrome/browser/media_gallery/media_device_notifications_linux.h"
8 8
9 #include <libudev.h> 9 #include <libudev.h>
10 #include <mntent.h> 10 #include <mntent.h>
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 kVendorModelSerialPrefix, 167 kVendorModelSerialPrefix,
168 vendor.c_str(), 168 vendor.c_str(),
169 kNonSpaceDelim, 169 kNonSpaceDelim,
170 model.c_str(), 170 model.c_str(),
171 kNonSpaceDelim, 171 kNonSpaceDelim,
172 serial_short.c_str()); 172 serial_short.c_str());
173 } else { 173 } else {
174 unique_id = kFSUniqueIdPrefix + unique_id; 174 unique_id = kFSUniqueIdPrefix + unique_id;
175 } 175 }
176 *id = MediaStorageUtil::MakeDeviceId( 176 *id = MediaStorageUtil::MakeDeviceId(
177 MediaStorageUtil::USB_MASS_STORAGE_WITH_DCIM, unique_id); 177 MediaStorageUtil::REMOVABLE_MASS_STORAGE_WITH_DCIM, unique_id);
178 } 178 }
179 return true; 179 return true;
180 } 180 }
181 181
182 } // namespace 182 } // namespace
183 183
184 MediaDeviceNotificationsLinux::MediaDeviceNotificationsLinux( 184 MediaDeviceNotificationsLinux::MediaDeviceNotificationsLinux(
185 const FilePath& path) 185 const FilePath& path)
186 : initialized_(false), 186 : initialized_(false),
187 mtab_path_(path), 187 mtab_path_(path),
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 382
383 SystemMonitor::Get()->ProcessRemovableStorageAttached(id, name, mount_point); 383 SystemMonitor::Get()->ProcessRemovableStorageAttached(id, name, mount_point);
384 } 384 }
385 385
386 void MediaDeviceNotificationsLinux::RemoveOldDevice( 386 void MediaDeviceNotificationsLinux::RemoveOldDevice(
387 const std::string& device_id) { 387 const std::string& device_id) {
388 SystemMonitor::Get()->ProcessRemovableStorageDetached(device_id); 388 SystemMonitor::Get()->ProcessRemovableStorageDetached(device_id);
389 } 389 }
390 390
391 } // namespace chrome 391 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698