OLD | NEW |
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_BROWSER_FILEAPI_SANDBOX_CONTEXT_H_ | 5 #ifndef WEBKIT_BROWSER_FILEAPI_SANDBOX_CONTEXT_H_ |
6 #define WEBKIT_BROWSER_FILEAPI_SANDBOX_CONTEXT_H_ | 6 #define WEBKIT_BROWSER_FILEAPI_SANDBOX_CONTEXT_H_ |
7 | 7 |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 static const base::FilePath::CharType kFileSystemDirectory[]; | 38 static const base::FilePath::CharType kFileSystemDirectory[]; |
39 | 39 |
40 SandboxContext( | 40 SandboxContext( |
41 quota::QuotaManagerProxy* quota_manager_proxy, | 41 quota::QuotaManagerProxy* quota_manager_proxy, |
42 base::SequencedTaskRunner* file_task_runner, | 42 base::SequencedTaskRunner* file_task_runner, |
43 const base::FilePath& profile_path, | 43 const base::FilePath& profile_path, |
44 quota::SpecialStoragePolicy* special_storage_policy); | 44 quota::SpecialStoragePolicy* special_storage_policy); |
45 | 45 |
46 ~SandboxContext(); | 46 ~SandboxContext(); |
47 | 47 |
48 base::SequencedTaskRunner* file_task_runner() { | |
49 return file_task_runner_.get(); | |
50 } | |
51 | |
52 AsyncFileUtilAdapter* file_util() { return sandbox_file_util_.get(); } | 48 AsyncFileUtilAdapter* file_util() { return sandbox_file_util_.get(); } |
53 FileSystemUsageCache* usage_cache() { return file_system_usage_cache_.get(); } | 49 FileSystemUsageCache* usage_cache() { return file_system_usage_cache_.get(); } |
54 SandboxQuotaObserver* quota_observer() { return quota_observer_.get(); }; | 50 SandboxQuotaObserver* quota_observer() { return quota_observer_.get(); }; |
55 | 51 |
56 quota::SpecialStoragePolicy* special_storage_policy() { | 52 quota::SpecialStoragePolicy* special_storage_policy() { |
57 return special_storage_policy_.get(); | 53 return special_storage_policy_.get(); |
58 } | 54 } |
59 | 55 |
60 ObfuscatedFileUtil* sync_file_util(); | 56 ObfuscatedFileUtil* sync_file_util(); |
61 | 57 |
62 private: | 58 private: |
63 scoped_refptr<base::SequencedTaskRunner> file_task_runner_; | 59 scoped_refptr<base::SequencedTaskRunner> file_task_runner_; |
64 | 60 |
65 scoped_ptr<AsyncFileUtilAdapter> sandbox_file_util_; | 61 scoped_ptr<AsyncFileUtilAdapter> sandbox_file_util_; |
66 scoped_ptr<FileSystemUsageCache> file_system_usage_cache_; | 62 scoped_ptr<FileSystemUsageCache> file_system_usage_cache_; |
67 scoped_ptr<SandboxQuotaObserver> quota_observer_; | 63 scoped_ptr<SandboxQuotaObserver> quota_observer_; |
68 | 64 |
69 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; | 65 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; |
70 | 66 |
71 DISALLOW_COPY_AND_ASSIGN(SandboxContext); | 67 DISALLOW_COPY_AND_ASSIGN(SandboxContext); |
72 }; | 68 }; |
73 | 69 |
74 } // namespace fileapi | 70 } // namespace fileapi |
75 | 71 |
76 #endif // WEBKIT_BROWSER_FILEAPI_SANDBOX_CONTEXT_H_ | 72 #endif // WEBKIT_BROWSER_FILEAPI_SANDBOX_CONTEXT_H_ |
OLD | NEW |