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

Side by Side Diff: webkit/fileapi/copy_or_move_file_validator.h

Issue 14225022: fileapi: Pass virtual path to copy validator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments 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
« no previous file with comments | « no previous file | webkit/fileapi/copy_or_move_file_validator_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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_COPY_OR_MOVE_FILE_VALIDATOR_H_ 5 #ifndef WEBKIT_FILEAPI_COPY_OR_MOVE_FILE_VALIDATOR_H_
6 #define WEBKIT_FILEAPI_COPY_OR_MOVE_FILE_VALIDATOR_H_ 6 #define WEBKIT_FILEAPI_COPY_OR_MOVE_FILE_VALIDATOR_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/platform_file.h" 10 #include "base/platform_file.h"
11 11
12 namespace fileapi { 12 namespace fileapi {
13 13
14 class CopyOrMoveFileValidator { 14 class CopyOrMoveFileValidator {
15 public: 15 public:
16 // Callback that is invoked when validation completes. A result of 16 // Callback that is invoked when validation completes. A result of
17 // base::PLATFORM_FILE_OK means the file validated. 17 // base::PLATFORM_FILE_OK means the file validated.
18 typedef base::Callback<void(base::PlatformFileError result)> ResultCallback; 18 typedef base::Callback<void(base::PlatformFileError result)> ResultCallback;
19 19
20 virtual ~CopyOrMoveFileValidator() {} 20 virtual ~CopyOrMoveFileValidator() {}
21 21
22 virtual void StartValidation(const ResultCallback& result_callback) = 0; 22 virtual void StartValidation(const ResultCallback& result_callback) = 0;
23 }; 23 };
24 24
25 class CopyOrMoveFileValidatorFactory { 25 class CopyOrMoveFileValidatorFactory {
26 public: 26 public:
27 virtual ~CopyOrMoveFileValidatorFactory() {} 27 virtual ~CopyOrMoveFileValidatorFactory() {}
28 28
29 // This method must always return a non-NULL validator. 29 // This method must always return a non-NULL validator. |src_url| is needed
30 // in addition to |platform_path| because in the obfuscated file system
31 // case, |platform_path| will be an obfuscated filename and extension.
30 virtual CopyOrMoveFileValidator* CreateCopyOrMoveFileValidator( 32 virtual CopyOrMoveFileValidator* CreateCopyOrMoveFileValidator(
33 const FileSystemURL& src_url,
31 const base::FilePath& platform_path) = 0; 34 const base::FilePath& platform_path) = 0;
32 }; 35 };
33 36
34 } // namespace fileapi 37 } // namespace fileapi
35 38
36 #endif // WEBKIT_FILEAPI_COPY_OR_MOVE_FILE_VALIDATOR_H_ 39 #endif // WEBKIT_FILEAPI_COPY_OR_MOVE_FILE_VALIDATOR_H_
OLDNEW
« no previous file with comments | « no previous file | webkit/fileapi/copy_or_move_file_validator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698