Backing out 7653a9cc00ae. Shouldn't have been checked in. r=me

This commit is contained in:
Doug Turner 2012-09-14 09:39:44 -07:00
parent 299c6551e5
commit 288a4898dd

View File

@ -612,7 +612,7 @@ nsDOMDeviceStorage::SetRootDirectoryForType(const nsAString& aType)
NS_ASSERTION(dirService, "Must have directory service"); NS_ASSERTION(dirService, "Must have directory service");
// Picture directory // Picture directory
if (aType.EqualsLiteral(DEVICESTORAGE_PICTURES)) { if (aType.Equals(NS_LITERAL_STRING("pictures"))) {
#ifdef MOZ_WIDGET_GONK #ifdef MOZ_WIDGET_GONK
NS_NewLocalFile(NS_LITERAL_STRING("/sdcard"), false, getter_AddRefs(f)); NS_NewLocalFile(NS_LITERAL_STRING("/sdcard"), false, getter_AddRefs(f));
#elif defined (MOZ_WIDGET_COCOA) #elif defined (MOZ_WIDGET_COCOA)
@ -625,7 +625,7 @@ nsDOMDeviceStorage::SetRootDirectoryForType(const nsAString& aType)
} }
// Video directory // Video directory
else if (aType.EqualsLiteral(DEVICESTORAGE_VIDEOS)) { else if (aType.Equals(NS_LITERAL_STRING("videos"))) {
#ifdef MOZ_WIDGET_GONK #ifdef MOZ_WIDGET_GONK
NS_NewLocalFile(NS_LITERAL_STRING("/sdcard"), false, getter_AddRefs(f)); NS_NewLocalFile(NS_LITERAL_STRING("/sdcard"), false, getter_AddRefs(f));
#elif defined (MOZ_WIDGET_COCOA) #elif defined (MOZ_WIDGET_COCOA)
@ -638,7 +638,7 @@ nsDOMDeviceStorage::SetRootDirectoryForType(const nsAString& aType)
} }
// Music directory // Music directory
else if (aType.EqualsLiteral(DEVICESTORAGE_MUSIC)) { else if (aType.Equals(NS_LITERAL_STRING("music"))) {
#ifdef MOZ_WIDGET_GONK #ifdef MOZ_WIDGET_GONK
NS_NewLocalFile(NS_LITERAL_STRING("/sdcard"), false, getter_AddRefs(f)); NS_NewLocalFile(NS_LITERAL_STRING("/sdcard"), false, getter_AddRefs(f));
#elif defined (MOZ_WIDGET_COCOA) #elif defined (MOZ_WIDGET_COCOA)
@ -649,15 +649,6 @@ nsDOMDeviceStorage::SetRootDirectoryForType(const nsAString& aType)
dirService->Get(NS_WIN_MUSIC_DIR, NS_GET_IID(nsIFile), getter_AddRefs(f)); dirService->Get(NS_WIN_MUSIC_DIR, NS_GET_IID(nsIFile), getter_AddRefs(f));
#endif #endif
} }
// Apps directory
else if (aType.EqualsLiteral(DEVICESTORAGE_APPS)) {
#ifdef MOZ_WIDGET_GONK
NS_NewLocalFile(NS_LITERAL_STRING("/data"), false, getter_AddRefs(f));
#else
// where do we store 3rd party applications on the desktop?
#endif
}
// in testing, we default all device storage types to a temp directory // in testing, we default all device storage types to a temp directory
if (f && mozilla::Preferences::GetBool("device.storage.testing", false)) { if (f && mozilla::Preferences::GetBool("device.storage.testing", false)) {