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

Side by Side Diff: webkit/fileapi/media/device_media_file_util.cc

Issue 10829147: Make MediaFileUtil run on thread pool. (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 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 #include "webkit/fileapi/media/device_media_file_util.h" 5 #include "webkit/fileapi/media/device_media_file_util.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop_proxy.h" 9 #include "base/message_loop_proxy.h"
10 #include "webkit/blob/shareable_file_reference.h" 10 #include "webkit/blob/shareable_file_reference.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 bool file_created = file_util::CreateTemporaryFileInDir( 187 bool file_created = file_util::CreateTemporaryFileInDir(
188 isolated_media_file_system_dir_path, local_path); 188 isolated_media_file_system_dir_path, local_path);
189 if (!file_created) 189 if (!file_created)
190 return file_ref; 190 return file_ref;
191 191
192 *result = context->media_device()->CreateSnapshotFile(url.path(), *local_path, 192 *result = context->media_device()->CreateSnapshotFile(url.path(), *local_path,
193 file_info); 193 file_info);
194 if (*result == base::PLATFORM_FILE_OK) { 194 if (*result == base::PLATFORM_FILE_OK) {
195 file_ref = ShareableFileReference::GetOrCreate( 195 file_ref = ShareableFileReference::GetOrCreate(
196 *local_path, ShareableFileReference::DELETE_ON_FINAL_RELEASE, 196 *local_path, ShareableFileReference::DELETE_ON_FINAL_RELEASE,
197 context->file_task_runner()); 197 context->task_runner());
198 } 198 }
199 return file_ref; 199 return file_ref;
200 } 200 }
201 201
202 } // namespace fileapi 202 } // namespace fileapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698