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

Unified Diff: webkit/fileapi/media/device_media_async_file_util.cc

Issue 12255023: [Media Galleries] Switch Mac MTP delegate to async interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: No log lines Created 7 years, 10 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: webkit/fileapi/media/device_media_async_file_util.cc
diff --git a/webkit/fileapi/media/device_media_async_file_util.cc b/webkit/fileapi/media/device_media_async_file_util.cc
index 12b433280ec9900e93d461114e196eded9bf2265..6235696ded0ad7a8fa692d1d1da720dfc779978b 100644
--- a/webkit/fileapi/media/device_media_async_file_util.cc
+++ b/webkit/fileapi/media/device_media_async_file_util.cc
@@ -15,6 +15,7 @@
#include "webkit/fileapi/media/filtering_file_enumerator.h"
#include "webkit/fileapi/media/media_path_filter.h"
#include "webkit/fileapi/media/mtp_device_async_delegate.h"
+#include "webkit/fileapi/media/mtp_device_file_system_config.h"
#include "webkit/fileapi/media/mtp_device_map_service.h"
namespace fileapi {
@@ -38,7 +39,7 @@ MTPDeviceAsyncDelegate* GetMTPDeviceDelegate(
context->mtp_device_delegate_url());
}
-// Called on the blocking pool thread to create a snapshot file to hold the
+// Called on a blocking pool thread to create a snapshot file to hold the
// contents of |device_file_path|. The snapshot file is created in
// "profile_path/kDeviceMediaAsyncFileUtilTempDir" directory. If the snapshot
// file is created successfully, |snapshot_file_path| will be a non-empty file
@@ -68,7 +69,12 @@ DeviceMediaAsyncFileUtil::~DeviceMediaAsyncFileUtil() {
// static
DeviceMediaAsyncFileUtil* DeviceMediaAsyncFileUtil::Create(
const base::FilePath& profile_path) {
+#if defined(USE_MTP_DEVICE_ASYNC_DELEGATE)
+ DCHECK(!profile_path.empty());
+ return new DeviceMediaAsyncFileUtil(profile_path);
+#else
return NULL;
+#endif
}
bool DeviceMediaAsyncFileUtil::CreateOrOpen(

Powered by Google App Engine
This is Rietveld 408576698