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

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

Issue 12223006: Cleanup: Introduce AsyncFileTestHelper for testing with async file/quota operations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comments Created 7 years, 10 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 WEBKIT_FILEAPI_LOCAL_FILE_SYSTEM_TEST_HELPER_H_ 5 #ifndef WEBKIT_FILEAPI_LOCAL_FILE_SYSTEM_TEST_HELPER_H_
6 #define WEBKIT_FILEAPI_LOCAL_FILE_SYSTEM_TEST_HELPER_H_ 6 #define WEBKIT_FILEAPI_LOCAL_FILE_SYSTEM_TEST_HELPER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 base::FilePath GetLocalPathFromASCII(const std::string& path); 55 base::FilePath GetLocalPathFromASCII(const std::string& path);
56 56
57 // Returns empty path if filesystem type is neither temporary nor persistent. 57 // Returns empty path if filesystem type is neither temporary nor persistent.
58 base::FilePath GetUsageCachePath() const; 58 base::FilePath GetUsageCachePath() const;
59 59
60 FileSystemURL CreateURL(const base::FilePath& path) const; 60 FileSystemURL CreateURL(const base::FilePath& path) const;
61 FileSystemURL CreateURLFromUTF8(const std::string& utf8) const { 61 FileSystemURL CreateURLFromUTF8(const std::string& utf8) const {
62 return CreateURL(base::FilePath::FromUTF8Unsafe(utf8)); 62 return CreateURL(base::FilePath::FromUTF8Unsafe(utf8));
63 } 63 }
64 64
65 // Helper methods for same-FileUtil copy/move.
66 base::PlatformFileError SameFileUtilCopy(
67 FileSystemOperationContext* context,
68 const FileSystemURL& src,
69 const FileSystemURL& dest) const;
70 base::PlatformFileError SameFileUtilMove(
71 FileSystemOperationContext* context,
72 const FileSystemURL& src,
73 const FileSystemURL& dest) const;
74
75 // This returns cached usage size returned by QuotaUtil. 65 // This returns cached usage size returned by QuotaUtil.
76 int64 GetCachedOriginUsage() const; 66 int64 GetCachedOriginUsage() const;
77 67
78 // This doesn't work with OFSFU. 68 // This doesn't work with OFSFU.
79 int64 ComputeCurrentOriginUsage() const; 69 int64 ComputeCurrentOriginUsage() const;
80 70
81 int64 ComputeCurrentDirectoryDatabaseUsage() const; 71 int64 ComputeCurrentDirectoryDatabaseUsage() const;
82 72
83 LocalFileSystemOperation* NewOperation(); 73 LocalFileSystemOperation* NewOperation();
84 FileSystemOperationContext* NewOperationContext(); 74 FileSystemOperationContext* NewOperationContext();
(...skipping 14 matching lines...) Expand all
99 89
100 scoped_refptr<FileSystemContext> file_system_context_; 90 scoped_refptr<FileSystemContext> file_system_context_;
101 const GURL origin_; 91 const GURL origin_;
102 const FileSystemType type_; 92 const FileSystemType type_;
103 FileSystemFileUtil* file_util_; 93 FileSystemFileUtil* file_util_;
104 }; 94 };
105 95
106 } // namespace fileapi 96 } // namespace fileapi
107 97
108 #endif // WEBKIT_FILEAPI_LOCAL_FILE_SYSTEM_TEST_HELPER_H_ 98 #endif // WEBKIT_FILEAPI_LOCAL_FILE_SYSTEM_TEST_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698