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

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

Issue 6749021: Added new fileBrowserPrivate and fileHandler extension APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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 #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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698