OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/ref_counted.h" | 8 #include "base/ref_counted.h" |
9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
10 #include "webkit/quota/special_storage_policy.h" | 10 #include "webkit/quota/special_storage_policy.h" |
| 11 #include "webkit/fileapi/sandbox_mount_point_provider.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 { |
20 class SpecialStoragePolicy; | 21 class SpecialStoragePolicy; |
(...skipping 26 matching lines...) Expand all Loading... |
47 bool IsStorageUnlimited(const GURL& origin); | 48 bool IsStorageUnlimited(const GURL& origin); |
48 | 49 |
49 void DeleteDataForOriginOnFileThread(const GURL& origin_url); | 50 void DeleteDataForOriginOnFileThread(const GURL& origin_url); |
50 | 51 |
51 FileSystemPathManager* path_manager() { return path_manager_.get(); } | 52 FileSystemPathManager* path_manager() { return path_manager_.get(); } |
52 FileSystemUsageTracker* usage_tracker() { return usage_tracker_.get(); } | 53 FileSystemUsageTracker* usage_tracker() { return usage_tracker_.get(); } |
53 | 54 |
54 private: | 55 private: |
55 friend struct DefaultContextDeleter; | 56 friend struct DefaultContextDeleter; |
56 void DeleteOnCorrectThread() const; | 57 void DeleteOnCorrectThread() const; |
| 58 SandboxMountPointProvider* sandbox_provider() const; |
57 | 59 |
58 scoped_refptr<base::MessageLoopProxy> file_message_loop_; | 60 scoped_refptr<base::MessageLoopProxy> file_message_loop_; |
59 scoped_refptr<base::MessageLoopProxy> io_message_loop_; | 61 scoped_refptr<base::MessageLoopProxy> io_message_loop_; |
60 | 62 |
61 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; | 63 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; |
62 const bool allow_file_access_from_files_; | 64 const bool allow_file_access_from_files_; |
63 const bool unlimited_quota_; | 65 const bool unlimited_quota_; |
64 | 66 |
65 scoped_ptr<FileSystemPathManager> path_manager_; | 67 scoped_ptr<FileSystemPathManager> path_manager_; |
66 scoped_ptr<FileSystemUsageTracker> usage_tracker_; | 68 scoped_ptr<FileSystemUsageTracker> usage_tracker_; |
67 | 69 |
68 DISALLOW_IMPLICIT_CONSTRUCTORS(FileSystemContext); | 70 DISALLOW_IMPLICIT_CONSTRUCTORS(FileSystemContext); |
69 }; | 71 }; |
70 | 72 |
71 struct DefaultContextDeleter { | 73 struct DefaultContextDeleter { |
72 static void Destruct(const FileSystemContext* context) { | 74 static void Destruct(const FileSystemContext* context) { |
73 context->DeleteOnCorrectThread(); | 75 context->DeleteOnCorrectThread(); |
74 } | 76 } |
75 }; | 77 }; |
76 | 78 |
77 } // namespace fileapi | 79 } // namespace fileapi |
78 | 80 |
79 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_ | 81 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_ |
OLD | NEW |