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

Side by Side Diff: webkit/fileapi/media/device_media_async_file_util.h

Issue 14075016: Change some snapshot- or temporary-file related changes to use ScopedFile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #ifndef WEBKIT_FILEAPI_MEDIA_DEVICE_MEDIA_ASYNC_FILE_UTIL_H_ 5 #ifndef WEBKIT_FILEAPI_MEDIA_DEVICE_MEDIA_ASYNC_FILE_UTIL_H_
6 #define WEBKIT_FILEAPI_MEDIA_DEVICE_MEDIA_ASYNC_FILE_UTIL_H_ 6 #define WEBKIT_FILEAPI_MEDIA_DEVICE_MEDIA_ASYNC_FILE_UTIL_H_
7 7
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/platform_file.h" 10 #include "base/platform_file.h"
11 #include "webkit/fileapi/async_file_util.h" 11 #include "webkit/fileapi/async_file_util.h"
12 #include "webkit/storage/webkit_storage_export.h" 12 #include "webkit/storage/webkit_storage_export.h"
13 13
14 namespace base { 14 namespace base {
15 class Time; 15 class Time;
16 class SequencedTaskRunner;
tzik 2013/04/25 05:06:07 sort?
kinuko 2013/04/25 06:02:08 Done.
16 } 17 }
17 18
18 namespace fileapi { 19 namespace fileapi {
19 20
20 class FileSystemOperationContext; 21 class FileSystemOperationContext;
21 class FileSystemURL; 22 class FileSystemURL;
22 23
23 class WEBKIT_STORAGE_EXPORT_PRIVATE DeviceMediaAsyncFileUtil 24 class WEBKIT_STORAGE_EXPORT_PRIVATE DeviceMediaAsyncFileUtil
24 : public AsyncFileUtil { 25 : public AsyncFileUtil {
25 public: 26 public:
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 void OnReadDirectoryError( 136 void OnReadDirectoryError(
136 const AsyncFileUtil::ReadDirectoryCallback& callback, 137 const AsyncFileUtil::ReadDirectoryCallback& callback,
137 base::PlatformFileError error); 138 base::PlatformFileError error);
138 139
139 // Called when the snapshot file specified by the |platform_path| is 140 // Called when the snapshot file specified by the |platform_path| is
140 // successfully created. |file_info| contains the device media file details 141 // successfully created. |file_info| contains the device media file details
141 // for which the snapshot file is created. |callback| is invoked to complete 142 // for which the snapshot file is created. |callback| is invoked to complete
142 // the CreateSnapshotFile request. 143 // the CreateSnapshotFile request.
143 void OnDidCreateSnapshotFile( 144 void OnDidCreateSnapshotFile(
144 const AsyncFileUtil::CreateSnapshotFileCallback& callback, 145 const AsyncFileUtil::CreateSnapshotFileCallback& callback,
146 base::SequencedTaskRunner* media_task_runner,
145 const base::PlatformFileInfo& file_info, 147 const base::PlatformFileInfo& file_info,
146 const base::FilePath& platform_path); 148 const base::FilePath& platform_path);
147 149
148 // Called when CreateSnapshotFile method call fails. |callback| is invoked to 150 // Called when CreateSnapshotFile method call fails. |callback| is invoked to
149 // notify the caller about the |error|. 151 // notify the caller about the |error|.
150 void OnCreateSnapshotFileError( 152 void OnCreateSnapshotFileError(
151 const AsyncFileUtil::CreateSnapshotFileCallback& callback, 153 const AsyncFileUtil::CreateSnapshotFileCallback& callback,
152 base::PlatformFileError error); 154 base::PlatformFileError error);
153 155
154 // Called when the snapshot file specified by the |snapshot_file_path| is 156 // Called when the snapshot file specified by the |snapshot_file_path| is
(...skipping 13 matching lines...) Expand all
168 170
169 // For callbacks that may run after destruction. 171 // For callbacks that may run after destruction.
170 base::WeakPtrFactory<DeviceMediaAsyncFileUtil> weak_ptr_factory_; 172 base::WeakPtrFactory<DeviceMediaAsyncFileUtil> weak_ptr_factory_;
171 173
172 DISALLOW_COPY_AND_ASSIGN(DeviceMediaAsyncFileUtil); 174 DISALLOW_COPY_AND_ASSIGN(DeviceMediaAsyncFileUtil);
173 }; 175 };
174 176
175 } // namespace fileapi 177 } // namespace fileapi
176 178
177 #endif // WEBKIT_FILEAPI_MEDIA_DEVICE_MEDIA_ASYNC_FILE_UTIL_H_ 179 #endif // WEBKIT_FILEAPI_MEDIA_DEVICE_MEDIA_ASYNC_FILE_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698