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

Unified Diff: chrome/browser/intents/device_attached_intent_source.cc

Issue 10876093: Improve the device type constants. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/intents/device_attached_intent_source.cc
diff --git a/chrome/browser/intents/device_attached_intent_source.cc b/chrome/browser/intents/device_attached_intent_source.cc
index 5cb5762417100d13e1aebaa1c312bb442dc3ea87..f80ee15ca91248757e0e87a6678ab1e0fd1dc5be 100644
--- a/chrome/browser/intents/device_attached_intent_source.cc
+++ b/chrome/browser/intents/device_attached_intent_source.cc
@@ -111,7 +111,7 @@ void DeviceAttachedIntentSource::OnRemovableStorageAttached(
// TODO(kmadhusu): Handle all device types. http://crbug.com/140353.
MediaStorageUtil::Type type;
MediaStorageUtil::CrackDeviceId(id, &type, NULL);
- if (type == MediaStorageUtil::USB_MTP)
+ if (type == MediaStorageUtil::MTP_OR_PTP)
return;
DCHECK(MediaStorageUtil::IsRemovableDevice(id));
@@ -166,7 +166,7 @@ void DeviceAttachedIntentSource::OnRemovableStorageDetached(
// TODO(kmadhusu, vandebo): Clean up this code. http://crbug.com/140340.
MediaStorageUtil::Type type;
MediaStorageUtil::CrackDeviceId(it->second.device_id, &type, NULL);
- if (type == MediaStorageUtil::USB_MTP) {
+ if (type == MediaStorageUtil::MTP_OR_PTP) {
MediaDeviceMapService::GetInstance()->RemoveMediaDevice(
it->second.location);
}

Powered by Google App Engine
This is Rietveld 408576698