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

Unified Diff: webkit/fileapi/async_file_util_adapter.cc

Issue 12703012: Have media gallery (through native media file util) use MIME sniffer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Previous code review response, plus trying to get new unit test passing. Created 7 years, 9 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/async_file_util_adapter.cc
diff --git a/webkit/fileapi/async_file_util_adapter.cc b/webkit/fileapi/async_file_util_adapter.cc
index 0b9f2c8bdd593f26452dfb35c3dc201b2af7a551..d755813fc2b097f1b85967200713e1b12855e600 100644
--- a/webkit/fileapi/async_file_util_adapter.cc
+++ b/webkit/fileapi/async_file_util_adapter.cc
@@ -12,6 +12,7 @@
#include "webkit/fileapi/file_system_operation_context.h"
#include "webkit/fileapi/file_system_url.h"
#include "webkit/fileapi/file_system_util.h"
+#include <fstream>
namespace fileapi {
@@ -59,6 +60,9 @@ class GetFileInfoHelper {
void CreateSnapshotFile(FileSystemFileUtil* file_util,
FileSystemOperationContext* context,
const FileSystemURL& url) {
+ LOG(WARNING) << "GetFileInfoHelper::CreateSnapshotFile";
+ std::ofstream mylog("/tmp/krblog", std::ios::app);
+ mylog << "GetFileInfoHelper::CreateSnapshotFile" << std::endl;
error_ = file_util->CreateSnapshotFile(
context, url, &file_info_, &platform_path_, &snapshot_policy_);
}
@@ -296,11 +300,17 @@ bool AsyncFileUtilAdapter::CreateSnapshotFile(
const FileSystemURL& url,
const CreateSnapshotFileCallback& callback) {
GetFileInfoHelper* helper = new GetFileInfoHelper;
+#if 1
return context->task_runner()->PostTaskAndReply(
FROM_HERE,
Bind(&GetFileInfoHelper::CreateSnapshotFile, Unretained(helper),
sync_file_util_.get(), context, url),
Bind(&GetFileInfoHelper::ReplySnapshotFile, Owned(helper), callback));
+#else
+ helper->CreateSnapshotFile(sync_file_util_.get(), context, url);
+ helper->ReplySnapshotFile(callback);
+ return true;
+#endif
}
} // namespace fileapi
« no previous file with comments | « no previous file | webkit/fileapi/local_file_util.cc » ('j') | webkit/fileapi/media/native_media_file_util_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698