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

Side by Side Diff: chrome/browser/media_galleries/fileapi/native_media_file_util.h

Issue 278113002: Remove PlatformFile from fileapi::AsyncFileUtil (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_NATIVE_MEDIA_FILE_UTIL_H_ 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_NATIVE_MEDIA_FILE_UTIL_H_
6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_NATIVE_MEDIA_FILE_UTIL_H_ 6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_NATIVE_MEDIA_FILE_UTIL_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "webkit/browser/fileapi/async_file_util.h" 10 #include "webkit/browser/fileapi/async_file_util.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 base::FilePath* platform_path, 198 base::FilePath* platform_path,
199 scoped_refptr<webkit_blob::ShareableFileReference>* file_ref); 199 scoped_refptr<webkit_blob::ShareableFileReference>* file_ref);
200 200
201 MediaPathFilter* media_path_filter() { 201 MediaPathFilter* media_path_filter() {
202 return media_path_filter_; 202 return media_path_filter_;
203 } 203 }
204 204
205 private: 205 private:
206 // Like GetLocalFilePath(), but always take media_path_filter() into 206 // Like GetLocalFilePath(), but always take media_path_filter() into
207 // consideration. If the media_path_filter() check fails, return 207 // consideration. If the media_path_filter() check fails, return
208 // PLATFORM_FILE_ERROR_SECURITY. |local_file_path| does not have to exist. 208 // Fila::FILE_ERROR_SECURITY. |local_file_path| does not have to exist.
209 base::File::Error GetFilteredLocalFilePath( 209 base::File::Error GetFilteredLocalFilePath(
210 fileapi::FileSystemOperationContext* context, 210 fileapi::FileSystemOperationContext* context,
211 const fileapi::FileSystemURL& file_system_url, 211 const fileapi::FileSystemURL& file_system_url,
212 base::FilePath* local_file_path); 212 base::FilePath* local_file_path);
213 213
214 // Like GetLocalFilePath(), but if the file does not exist, then return 214 // Like GetLocalFilePath(), but if the file does not exist, then return
215 // |failure_error|. 215 // |failure_error|.
216 // If |local_file_path| is a file, then take media_path_filter() into 216 // If |local_file_path| is a file, then take media_path_filter() into
217 // consideration. 217 // consideration.
218 // If the media_path_filter() check fails, return |failure_error|. 218 // If the media_path_filter() check fails, return |failure_error|.
219 // If |local_file_path| is a directory, return PLATFORM_FILE_OK. 219 // If |local_file_path| is a directory, return File::FILE_OK.
220 base::File::Error GetFilteredLocalFilePathForExistingFileOrDirectory( 220 base::File::Error GetFilteredLocalFilePathForExistingFileOrDirectory(
221 fileapi::FileSystemOperationContext* context, 221 fileapi::FileSystemOperationContext* context,
222 const fileapi::FileSystemURL& file_system_url, 222 const fileapi::FileSystemURL& file_system_url,
223 base::File::Error failure_error, 223 base::File::Error failure_error,
224 base::FilePath* local_file_path); 224 base::FilePath* local_file_path);
225 225
226 226
227 // Not owned, owned by the backend which owns this. 227 // Not owned, owned by the backend which owns this.
228 MediaPathFilter* media_path_filter_; 228 MediaPathFilter* media_path_filter_;
229 229
230 base::WeakPtrFactory<NativeMediaFileUtil> weak_factory_; 230 base::WeakPtrFactory<NativeMediaFileUtil> weak_factory_;
231 231
232 DISALLOW_COPY_AND_ASSIGN(NativeMediaFileUtil); 232 DISALLOW_COPY_AND_ASSIGN(NativeMediaFileUtil);
233 }; 233 };
234 234
235 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_NATIVE_MEDIA_FILE_UTIL_H_ 235 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_NATIVE_MEDIA_FILE_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698