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

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

Issue 8999017: Add CreateFileSystemOperation() method to FileSystemContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clang build fix Created 8 years, 11 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) 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 #include "webkit/fileapi/sandbox_mount_point_provider.h" 5 #include "webkit/fileapi/sandbox_mount_point_provider.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/message_loop.h" 11 #include "base/message_loop.h"
12 #include "base/message_loop_proxy.h" 12 #include "base/message_loop_proxy.h"
13 #include "base/rand_util.h" 13 #include "base/rand_util.h"
14 #include "base/string_util.h" 14 #include "base/string_util.h"
15 #include "base/stringprintf.h" 15 #include "base/stringprintf.h"
16 #include "base/metrics/histogram.h" 16 #include "base/metrics/histogram.h"
17 #include "googleurl/src/gurl.h" 17 #include "googleurl/src/gurl.h"
18 #include "net/base/net_util.h" 18 #include "net/base/net_util.h"
19 #include "webkit/fileapi/file_system_callback_dispatcher.h"
19 #include "webkit/fileapi/file_system_operation.h" 20 #include "webkit/fileapi/file_system_operation.h"
20 #include "webkit/fileapi/file_system_operation_context.h" 21 #include "webkit/fileapi/file_system_operation_context.h"
21 #include "webkit/fileapi/file_system_options.h" 22 #include "webkit/fileapi/file_system_options.h"
22 #include "webkit/fileapi/file_system_types.h" 23 #include "webkit/fileapi/file_system_types.h"
23 #include "webkit/fileapi/file_system_usage_cache.h" 24 #include "webkit/fileapi/file_system_usage_cache.h"
24 #include "webkit/fileapi/file_system_util.h" 25 #include "webkit/fileapi/file_system_util.h"
25 #include "webkit/fileapi/obfuscated_file_util.h" 26 #include "webkit/fileapi/obfuscated_file_util.h"
26 #include "webkit/fileapi/quota_file_util.h" 27 #include "webkit/fileapi/quota_file_util.h"
27 #include "webkit/glue/webkit_glue.h" 28 #include "webkit/glue/webkit_glue.h"
28 #include "webkit/quota/quota_manager.h" 29 #include "webkit/quota/quota_manager.h"
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 // TODO(ericu): Implement this method and check for access permissions as 404 // TODO(ericu): Implement this method and check for access permissions as
404 // fileBrowserPrivate extension API does. We currently have another mechanism, 405 // fileBrowserPrivate extension API does. We currently have another mechanism,
405 // but we should switch over. This may also need to call MigrateIfNeeded(). 406 // but we should switch over. This may also need to call MigrateIfNeeded().
406 return std::vector<FilePath>(); 407 return std::vector<FilePath>();
407 } 408 }
408 409
409 FileSystemFileUtil* SandboxMountPointProvider::GetFileUtil() { 410 FileSystemFileUtil* SandboxMountPointProvider::GetFileUtil() {
410 return sandbox_file_util_.get(); 411 return sandbox_file_util_.get();
411 } 412 }
412 413
414 FileSystemOperationInterface*
415 SandboxMountPointProvider::CreateFileSystemOperation(
416 const GURL& origin_url,
417 FileSystemType file_system_type,
418 const FilePath& virtual_path,
419 scoped_ptr<FileSystemCallbackDispatcher> dispatcher,
420 base::MessageLoopProxy* file_proxy,
421 FileSystemContext* context) const {
422 return new FileSystemOperation(dispatcher.Pass(), file_proxy, context);
423 }
424
413 FilePath SandboxMountPointProvider::old_base_path() const { 425 FilePath SandboxMountPointProvider::old_base_path() const {
414 return profile_path_.Append(kOldFileSystemDirectory); 426 return profile_path_.Append(kOldFileSystemDirectory);
415 } 427 }
416 428
417 FilePath SandboxMountPointProvider::new_base_path() const { 429 FilePath SandboxMountPointProvider::new_base_path() const {
418 return profile_path_.Append(kNewFileSystemDirectory); 430 return profile_path_.Append(kNewFileSystemDirectory);
419 } 431 }
420 432
421 FilePath SandboxMountPointProvider::renamed_old_base_path() const { 433 FilePath SandboxMountPointProvider::renamed_old_base_path() const {
422 return profile_path_.Append(kRenamedOldFileSystemDirectory); 434 return profile_path_.Append(kRenamedOldFileSystemDirectory);
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 i < file_system_options_.additional_allowed_schemes().size(); 641 i < file_system_options_.additional_allowed_schemes().size();
630 ++i) { 642 ++i) {
631 if (url.SchemeIs( 643 if (url.SchemeIs(
632 file_system_options_.additional_allowed_schemes()[i].c_str())) 644 file_system_options_.additional_allowed_schemes()[i].c_str()))
633 return true; 645 return true;
634 } 646 }
635 return false; 647 return false;
636 } 648 }
637 649
638 } // namespace fileapi 650 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/sandbox_mount_point_provider.h ('k') | webkit/tools/test_shell/simple_file_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698