Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #include "webkit/fileapi/sandbox_mount_point_provider.h" | 5 #include "webkit/fileapi/sandbox_mount_point_provider.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/memory/scoped_callback_factory.h" | 8 #include "base/memory/scoped_callback_factory.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 119 scoped_refptr<base::MessageLoopProxy> file_message_loop, | 119 scoped_refptr<base::MessageLoopProxy> file_message_loop, |
| 120 const FilePath& profile_path) | 120 const FilePath& profile_path) |
| 121 : path_manager_(path_manager), | 121 : path_manager_(path_manager), |
| 122 file_message_loop_(file_message_loop), | 122 file_message_loop_(file_message_loop), |
| 123 base_path_(profile_path.Append(kFileSystemDirectory)) { | 123 base_path_(profile_path.Append(kFileSystemDirectory)) { |
| 124 } | 124 } |
| 125 | 125 |
| 126 SandboxMountPointProvider::~SandboxMountPointProvider() { | 126 SandboxMountPointProvider::~SandboxMountPointProvider() { |
| 127 } | 127 } |
| 128 | 128 |
| 129 bool SandboxMountPointProvider::IsAccessAllowed(const GURL& origin_url) { | 129 bool SandboxMountPointProvider::IsAccessAllowed(const GURL& origin_url, |
| 130 const FilePath& virtual_path) { | |
|
ericu
2011/04/07 01:40:58
s/virtual_path/unused, here.
zel
2011/04/07 02:54:42
Done.
| |
| 130 // We essentially depend on quota to do our access controls. | 131 // We essentially depend on quota to do our access controls. |
| 131 return path_manager_->IsAllowedScheme(origin_url); | 132 return path_manager_->IsAllowedScheme(origin_url); |
| 132 } | 133 } |
| 133 | 134 |
| 134 class SandboxMountPointProvider::GetFileSystemRootPathTask | 135 class SandboxMountPointProvider::GetFileSystemRootPathTask |
| 135 : public base::RefCountedThreadSafe< | 136 : public base::RefCountedThreadSafe< |
| 136 SandboxMountPointProvider::GetFileSystemRootPathTask> { | 137 SandboxMountPointProvider::GetFileSystemRootPathTask> { |
| 137 public: | 138 public: |
| 138 GetFileSystemRootPathTask( | 139 GetFileSystemRootPathTask( |
| 139 scoped_refptr<base::MessageLoopProxy> file_message_loop, | 140 scoped_refptr<base::MessageLoopProxy> file_message_loop, |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 307 | 308 |
| 308 std::string type_string = | 309 std::string type_string = |
| 309 FileSystemPathManager::GetFileSystemTypeString(type); | 310 FileSystemPathManager::GetFileSystemTypeString(type); |
| 310 DCHECK(!type_string.empty()); | 311 DCHECK(!type_string.empty()); |
| 311 if (name) | 312 if (name) |
| 312 *name = origin_identifier + ":" + type_string; | 313 *name = origin_identifier + ":" + type_string; |
| 313 return true; | 314 return true; |
| 314 } | 315 } |
| 315 | 316 |
| 316 } // namespace fileapi | 317 } // namespace fileapi |
| OLD | NEW |