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

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

Issue 10993066: Add oem mount point to cros_mount_provider. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: forgot one file Created 8 years, 2 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/local_file_system_operation.h" 5 #include "webkit/fileapi/local_file_system_operation.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 callback.Run(result, file_info, platform_path, file_ref); 731 callback.Run(result, file_info, platform_path, file_ref);
732 } 732 }
733 733
734 base::PlatformFileError LocalFileSystemOperation::SetUp( 734 base::PlatformFileError LocalFileSystemOperation::SetUp(
735 const FileSystemURL& url, 735 const FileSystemURL& url,
736 FileSystemFileUtil** file_util, 736 FileSystemFileUtil** file_util,
737 SetUpMode mode) { 737 SetUpMode mode) {
738 if (!url.is_valid()) 738 if (!url.is_valid())
739 return base::PLATFORM_FILE_ERROR_INVALID_URL; 739 return base::PLATFORM_FILE_ERROR_INVALID_URL;
740 740
741 // Restricted file system is read-only.
742 if (url.type() == fileapi::kFileSystemTypeRestrictedNativeLocal &&
743 mode != SETUP_FOR_READ)
744 return base::PLATFORM_FILE_ERROR_SECURITY;
745
741 if (!file_system_context()->GetMountPointProvider( 746 if (!file_system_context()->GetMountPointProvider(
742 url.type())->IsAccessAllowed(url)) 747 url.type())->IsAccessAllowed(url))
743 return base::PLATFORM_FILE_ERROR_SECURITY; 748 return base::PLATFORM_FILE_ERROR_SECURITY;
744 749
745 DCHECK(file_util); 750 DCHECK(file_util);
746 if (!*file_util) 751 if (!*file_util)
747 *file_util = file_system_context()->GetFileUtil(url.type()); 752 *file_util = file_system_context()->GetFileUtil(url.type());
748 if (!*file_util) 753 if (!*file_util)
749 return base::PLATFORM_FILE_ERROR_SECURITY; 754 return base::PLATFORM_FILE_ERROR_SECURITY;
750 755
(...skipping 26 matching lines...) Expand all
777 } 782 }
778 783
779 bool LocalFileSystemOperation::SetPendingOperationType(OperationType type) { 784 bool LocalFileSystemOperation::SetPendingOperationType(OperationType type) {
780 if (pending_operation_ != kOperationNone) 785 if (pending_operation_ != kOperationNone)
781 return false; 786 return false;
782 pending_operation_ = type; 787 pending_operation_ = type;
783 return true; 788 return true;
784 } 789 }
785 790
786 } // namespace fileapi 791 } // namespace fileapi
OLDNEW
« webkit/chromeos/fileapi/cros_mount_point_provider.cc ('K') | « webkit/fileapi/file_system_types.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698