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

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

Issue 10082002: Add FileSystemMountPointProvider::CreateFileReader() which returns appropriate Reader instance (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 8 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) 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_file_reader.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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 FileSystemOperationInterface* 427 FileSystemOperationInterface*
427 SandboxMountPointProvider::CreateFileSystemOperation( 428 SandboxMountPointProvider::CreateFileSystemOperation(
428 const GURL& origin_url, 429 const GURL& origin_url,
429 FileSystemType file_system_type, 430 FileSystemType file_system_type,
430 const FilePath& virtual_path, 431 const FilePath& virtual_path,
431 base::MessageLoopProxy* file_proxy, 432 base::MessageLoopProxy* file_proxy,
432 FileSystemContext* context) const { 433 FileSystemContext* context) const {
433 return new FileSystemOperation(file_proxy, context); 434 return new FileSystemOperation(file_proxy, context);
434 } 435 }
435 436
437 webkit_blob::FileReader* SandboxMountPointProvider::CreateFileReader(
438 const GURL& url,
439 int64 offset,
440 base::MessageLoopProxy* file_proxy,
441 FileSystemContext* context) const {
442 return new FileSystemFileReader(file_proxy, context, url, offset);
443 }
444
436 FilePath SandboxMountPointProvider::old_base_path() const { 445 FilePath SandboxMountPointProvider::old_base_path() const {
437 return profile_path_.Append(kOldFileSystemDirectory); 446 return profile_path_.Append(kOldFileSystemDirectory);
438 } 447 }
439 448
440 FilePath SandboxMountPointProvider::new_base_path() const { 449 FilePath SandboxMountPointProvider::new_base_path() const {
441 return profile_path_.Append(kNewFileSystemDirectory); 450 return profile_path_.Append(kNewFileSystemDirectory);
442 } 451 }
443 452
444 FilePath SandboxMountPointProvider::renamed_old_base_path() const { 453 FilePath SandboxMountPointProvider::renamed_old_base_path() const {
445 return profile_path_.Append(kRenamedOldFileSystemDirectory); 454 return profile_path_.Append(kRenamedOldFileSystemDirectory);
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 i < file_system_options_.additional_allowed_schemes().size(); 670 i < file_system_options_.additional_allowed_schemes().size();
662 ++i) { 671 ++i) {
663 if (url.SchemeIs( 672 if (url.SchemeIs(
664 file_system_options_.additional_allowed_schemes()[i].c_str())) 673 file_system_options_.additional_allowed_schemes()[i].c_str()))
665 return true; 674 return true;
666 } 675 }
667 return false; 676 return false;
668 } 677 }
669 678
670 } // namespace fileapi 679 } // namespace fileapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698