| OLD | NEW |
| 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_BROWSER_FILEAPI_SANDBOX_FILE_SYSTEM_BACKEND_H_ | 5 #ifndef WEBKIT_BROWSER_FILEAPI_SANDBOX_FILE_SYSTEM_BACKEND_H_ |
| 6 #define WEBKIT_BROWSER_FILEAPI_SANDBOX_FILE_SYSTEM_BACKEND_H_ | 6 #define WEBKIT_BROWSER_FILEAPI_SANDBOX_FILE_SYSTEM_BACKEND_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/memory/weak_ptr.h" | |
| 16 #include "webkit/browser/fileapi/file_system_backend.h" | 15 #include "webkit/browser/fileapi/file_system_backend.h" |
| 17 #include "webkit/browser/fileapi/file_system_quota_util.h" | 16 #include "webkit/browser/fileapi/file_system_quota_util.h" |
| 18 #include "webkit/browser/fileapi/sandbox_context.h" | 17 #include "webkit/browser/fileapi/sandbox_context.h" |
| 19 #include "webkit/browser/fileapi/task_runner_bound_observer_list.h" | 18 #include "webkit/browser/fileapi/task_runner_bound_observer_list.h" |
| 20 #include "webkit/browser/quota/special_storage_policy.h" | 19 #include "webkit/browser/quota/special_storage_policy.h" |
| 21 #include "webkit/browser/webkit_storage_browser_export.h" | 20 #include "webkit/browser/webkit_storage_browser_export.h" |
| 22 | 21 |
| 23 namespace fileapi { | 22 namespace fileapi { |
| 24 | 23 |
| 25 // An interface to construct or crack sandboxed filesystem paths for | 24 // An interface to construct or crack sandboxed filesystem paths for |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 FileSystemType type, | 100 FileSystemType type, |
| 102 FileAccessObserver* observer, | 101 FileAccessObserver* observer, |
| 103 base::SequencedTaskRunner* task_runner) OVERRIDE; | 102 base::SequencedTaskRunner* task_runner) OVERRIDE; |
| 104 virtual const UpdateObserverList* GetUpdateObservers( | 103 virtual const UpdateObserverList* GetUpdateObservers( |
| 105 FileSystemType type) const OVERRIDE; | 104 FileSystemType type) const OVERRIDE; |
| 106 virtual const ChangeObserverList* GetChangeObservers( | 105 virtual const ChangeObserverList* GetChangeObservers( |
| 107 FileSystemType type) const OVERRIDE; | 106 FileSystemType type) const OVERRIDE; |
| 108 virtual const AccessObserverList* GetAccessObservers( | 107 virtual const AccessObserverList* GetAccessObservers( |
| 109 FileSystemType type) const OVERRIDE; | 108 FileSystemType type) const OVERRIDE; |
| 110 | 109 |
| 111 void CollectOpenFileSystemMetrics(base::PlatformFileError error_code); | |
| 112 | |
| 113 void set_enable_temporary_file_system_in_incognito(bool enable) { | 110 void set_enable_temporary_file_system_in_incognito(bool enable) { |
| 114 enable_temporary_file_system_in_incognito_ = enable; | 111 enable_temporary_file_system_in_incognito_ = enable; |
| 115 } | 112 } |
| 116 | 113 |
| 117 private: | 114 private: |
| 118 SandboxContext* sandbox_context_; // Not owned. | 115 SandboxContext* sandbox_context_; // Not owned. |
| 119 | 116 |
| 120 bool enable_temporary_file_system_in_incognito_; | 117 bool enable_temporary_file_system_in_incognito_; |
| 121 | 118 |
| 122 // Observers. | 119 // Observers. |
| 123 UpdateObserverList update_observers_; | 120 UpdateObserverList update_observers_; |
| 124 ChangeObserverList change_observers_; | 121 ChangeObserverList change_observers_; |
| 125 AccessObserverList access_observers_; | 122 AccessObserverList access_observers_; |
| 126 | 123 |
| 127 // Observers for syncable file systems. | 124 // Observers for syncable file systems. |
| 128 UpdateObserverList syncable_update_observers_; | 125 UpdateObserverList syncable_update_observers_; |
| 129 ChangeObserverList syncable_change_observers_; | 126 ChangeObserverList syncable_change_observers_; |
| 130 | 127 |
| 131 base::Time next_release_time_for_open_filesystem_stat_; | |
| 132 | |
| 133 base::WeakPtrFactory<SandboxFileSystemBackend> weak_factory_; | |
| 134 | |
| 135 DISALLOW_COPY_AND_ASSIGN(SandboxFileSystemBackend); | 128 DISALLOW_COPY_AND_ASSIGN(SandboxFileSystemBackend); |
| 136 }; | 129 }; |
| 137 | 130 |
| 138 } // namespace fileapi | 131 } // namespace fileapi |
| 139 | 132 |
| 140 #endif // WEBKIT_BROWSER_FILEAPI_SANDBOX_FILE_SYSTEM_BACKEND_H_ | 133 #endif // WEBKIT_BROWSER_FILEAPI_SANDBOX_FILE_SYSTEM_BACKEND_H_ |
| OLD | NEW |