OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_FILE_SYSTEM_CONTEXT_H_ | 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_ |
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_ | 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "webkit/fileapi/file_system_types.h" |
10 #include "webkit/quota/special_storage_policy.h" | 11 #include "webkit/quota/special_storage_policy.h" |
11 | 12 |
12 class FilePath; | 13 class FilePath; |
13 class GURL; | 14 class GURL; |
14 | 15 |
15 namespace base { | 16 namespace base { |
16 class MessageLoopProxy; | 17 class MessageLoopProxy; |
17 } | 18 } |
18 | 19 |
19 namespace quota { | 20 namespace quota { |
(...skipping 23 matching lines...) Expand all Loading... |
43 const FilePath& profile_path, | 44 const FilePath& profile_path, |
44 bool is_incognito, | 45 bool is_incognito, |
45 bool allow_file_access_from_files, | 46 bool allow_file_access_from_files, |
46 bool unlimited_quota, | 47 bool unlimited_quota, |
47 FileSystemPathManager* path_manager); | 48 FileSystemPathManager* path_manager); |
48 ~FileSystemContext(); | 49 ~FileSystemContext(); |
49 | 50 |
50 // This method can be called on any thread. | 51 // This method can be called on any thread. |
51 bool IsStorageUnlimited(const GURL& origin); | 52 bool IsStorageUnlimited(const GURL& origin); |
52 | 53 |
53 void DeleteDataForOriginOnFileThread(const GURL& origin_url); | 54 bool DeleteDataForOriginOnFileThread(const GURL& origin_url); |
| 55 bool DeleteDataForOriginAndTypeOnFileThread(const GURL& origin_url, |
| 56 FileSystemType type); |
54 | 57 |
55 FileSystemPathManager* path_manager() const { return path_manager_.get(); } | 58 FileSystemPathManager* path_manager() const { return path_manager_.get(); } |
56 quota::QuotaManagerProxy* quota_manager_proxy() const { | 59 quota::QuotaManagerProxy* quota_manager_proxy() const { |
57 return quota_manager_proxy_.get(); | 60 return quota_manager_proxy_.get(); |
58 } | 61 } |
59 | 62 |
60 private: | 63 private: |
61 friend struct DefaultContextDeleter; | 64 friend struct DefaultContextDeleter; |
62 void DeleteOnCorrectThread() const; | 65 void DeleteOnCorrectThread() const; |
63 SandboxMountPointProvider* sandbox_provider() const; | 66 SandboxMountPointProvider* sandbox_provider() const; |
(...skipping 13 matching lines...) Expand all Loading... |
77 | 80 |
78 struct DefaultContextDeleter { | 81 struct DefaultContextDeleter { |
79 static void Destruct(const FileSystemContext* context) { | 82 static void Destruct(const FileSystemContext* context) { |
80 context->DeleteOnCorrectThread(); | 83 context->DeleteOnCorrectThread(); |
81 } | 84 } |
82 }; | 85 }; |
83 | 86 |
84 } // namespace fileapi | 87 } // namespace fileapi |
85 | 88 |
86 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_ | 89 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_ |
OLD | NEW |