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

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

Issue 7608011: Simplify directory path accounting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rolled in CR feedback. Created 9 years, 4 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) 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_SANDBOX_MOUNT_POINT_PROVIDER_H_ 5 #ifndef WEBKIT_FILEAPI_SANDBOX_MOUNT_POINT_PROVIDER_H_
6 #define WEBKIT_FILEAPI_SANDBOX_MOUNT_POINT_PROVIDER_H_ 6 #define WEBKIT_FILEAPI_SANDBOX_MOUNT_POINT_PROVIDER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/file_path.h" 12 #include "base/file_path.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "googleurl/src/gurl.h" 14 #include "googleurl/src/gurl.h"
15 #include "webkit/fileapi/file_system_mount_point_provider.h" 15 #include "webkit/fileapi/file_system_mount_point_provider.h"
16 #include "webkit/fileapi/file_system_quota_util.h" 16 #include "webkit/fileapi/file_system_quota_util.h"
17 17
18 namespace base { 18 namespace base {
19 class MessageLoopProxy; 19 class MessageLoopProxy;
20 } 20 }
21 21
22 namespace quota { 22 namespace quota {
23 class QuotaManagerProxy; 23 class QuotaManagerProxy;
24 } 24 }
25 25
26 namespace fileapi { 26 namespace fileapi {
27 27
28 class ObfuscatedFileSystemFileUtil; 28 class ObfuscatedFileSystemFileUtil;
29 class QuotaFileUtil;
30 29
31 // An interface to construct or crack sandboxed filesystem paths. 30 // An interface to construct or crack sandboxed filesystem paths.
32 // Currently each sandboxed filesystem path looks like (soon will be changed): 31 // Currently each sandboxed filesystem path looks like (soon will be changed):
33 // <profile_dir>/FileSystem/<origin_identifier>/<type>/chrome-<unique>/... 32 // <profile_dir>/FileSystem/<origin_identifier>/<type>/chrome-<unique>/...
34 // <type> is either one of "Temporary" or "Persistent". 33 // <type> is either one of "Temporary" or "Persistent".
35 class SandboxMountPointProvider 34 class SandboxMountPointProvider
36 : public FileSystemMountPointProvider, 35 : public FileSystemMountPointProvider,
37 public FileSystemQuotaUtil { 36 public FileSystemQuotaUtil {
38 public: 37 public:
39 // Origin enumerator interface. 38 // Origin enumerator interface.
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 friend class SandboxMountPointProviderOriginEnumeratorTest; 162 friend class SandboxMountPointProviderOriginEnumeratorTest;
164 163
165 // The path_manager_ isn't owned by this instance; this instance is owned by 164 // The path_manager_ isn't owned by this instance; this instance is owned by
166 // the path_manager_, and they have the same lifetime. 165 // the path_manager_, and they have the same lifetime.
167 FileSystemPathManager* path_manager_; 166 FileSystemPathManager* path_manager_;
168 167
169 scoped_refptr<base::MessageLoopProxy> file_message_loop_; 168 scoped_refptr<base::MessageLoopProxy> file_message_loop_;
170 169
171 const FilePath profile_path_; 170 const FilePath profile_path_;
172 171
173 QuotaFileUtil *quota_file_util_;
174 scoped_refptr<ObfuscatedFileSystemFileUtil> sandbox_file_util_; 172 scoped_refptr<ObfuscatedFileSystemFileUtil> sandbox_file_util_;
175 173
176 // Acccessed only on the file thread. 174 // Acccessed only on the file thread.
177 std::set<GURL> visited_origins_; 175 std::set<GURL> visited_origins_;
178 176
179 DISALLOW_COPY_AND_ASSIGN(SandboxMountPointProvider); 177 DISALLOW_COPY_AND_ASSIGN(SandboxMountPointProvider);
180 }; 178 };
181 179
182 } // namespace fileapi 180 } // namespace fileapi
183 181
184 #endif // WEBKIT_FILEAPI_SANDBOX_MOUNT_POINT_PROVIDER_H_ 182 #endif // WEBKIT_FILEAPI_SANDBOX_MOUNT_POINT_PROVIDER_H_
OLDNEW
« no previous file with comments | « webkit/fileapi/quota_file_util_unittest.cc ('k') | webkit/fileapi/sandbox_mount_point_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698