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

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

Issue 7470037: [Refactor] to rename and re-layer the file_util stack layers. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Rebased. 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_FILE_SYSTEM_PATH_MANAGER_H_ 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_PATH_MANAGER_H_
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_PATH_MANAGER_H_ 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_PATH_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/callback_old.h" 9 #include "base/callback_old.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
11 #include "base/file_util.h" 11 #include "base/file_util.h"
12 #include "webkit/fileapi/file_system_types.h" 12 #include "webkit/fileapi/file_system_types.h"
13 #include "webkit/quota/special_storage_policy.h" 13 #include "webkit/quota/special_storage_policy.h"
14 14
15 class GURL; 15 class GURL;
16 16
17 namespace base { 17 namespace base {
18 class MessageLoopProxy; 18 class MessageLoopProxy;
19 } 19 }
20 20
21 namespace fileapi { 21 namespace fileapi {
22 22
23 class ExternalFileSystemMountPointProvider; 23 class ExternalFileSystemMountPointProvider;
24 class FileSystemFileUtil; 24 class FileUtil;
25 class SandboxMountPointProvider; 25 class SandboxMountPointProvider;
26 26
27 class FileSystemPathManager { 27 class FileSystemPathManager {
28 public: 28 public:
29 FileSystemPathManager( 29 FileSystemPathManager(
30 scoped_refptr<base::MessageLoopProxy> file_message_loop, 30 scoped_refptr<base::MessageLoopProxy> file_message_loop,
31 const FilePath& profile_path, 31 const FilePath& profile_path,
32 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy, 32 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy,
33 bool is_incognito, 33 bool is_incognito,
34 bool allow_file_access_from_files); 34 bool allow_file_access_from_files);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 // Checks if a given |name| contains any restricted names/chars in it. 72 // Checks if a given |name| contains any restricted names/chars in it.
73 bool IsRestrictedFileName(FileSystemType type, 73 bool IsRestrictedFileName(FileSystemType type,
74 const FilePath& filename); 74 const FilePath& filename);
75 75
76 // Checks if an origin has access to a particular filesystem type and 76 // Checks if an origin has access to a particular filesystem type and
77 // file element represented by |virtual_path|. 77 // file element represented by |virtual_path|.
78 bool IsAccessAllowed(const GURL& origin, FileSystemType type, 78 bool IsAccessAllowed(const GURL& origin, FileSystemType type,
79 const FilePath& virtual_path); 79 const FilePath& virtual_path);
80 80
81 FileSystemFileUtil* GetFileSystemFileUtil(FileSystemType type) const; 81 FileUtil* GetFileUtil(FileSystemType type) const;
82 82
83 SandboxMountPointProvider* sandbox_provider() const { 83 SandboxMountPointProvider* sandbox_provider() const {
84 return sandbox_provider_.get(); 84 return sandbox_provider_.get();
85 } 85 }
86 86
87 ExternalFileSystemMountPointProvider* external_provider() const { 87 ExternalFileSystemMountPointProvider* external_provider() const {
88 return external_provider_.get(); 88 return external_provider_.get();
89 } 89 }
90 90
91 bool is_incognito() const { 91 bool is_incognito() const {
92 return is_incognito_; 92 return is_incognito_;
93 } 93 }
94 94
95 private: 95 private:
96 const bool is_incognito_; 96 const bool is_incognito_;
97 const bool allow_file_access_from_files_; 97 const bool allow_file_access_from_files_;
98 scoped_ptr<SandboxMountPointProvider> sandbox_provider_; 98 scoped_ptr<SandboxMountPointProvider> sandbox_provider_;
99 scoped_ptr<ExternalFileSystemMountPointProvider> external_provider_; 99 scoped_ptr<ExternalFileSystemMountPointProvider> external_provider_;
100 100
101 DISALLOW_COPY_AND_ASSIGN(FileSystemPathManager); 101 DISALLOW_COPY_AND_ASSIGN(FileSystemPathManager);
102 }; 102 };
103 103
104 } // namespace fileapi 104 } // namespace fileapi
105 105
106 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_PATH_MANAGER_H_ 106 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_PATH_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698