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

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

Issue 10823273: Integrate external mount points to IsolatedContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove too strict DCHECK Created 8 years, 4 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
« no previous file with comments | « webkit/fileapi/isolated_mount_point_provider.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 } 715 }
716 716
717 base::PlatformFileError LocalFileSystemOperation::SetUp( 717 base::PlatformFileError LocalFileSystemOperation::SetUp(
718 const FileSystemURL& url, 718 const FileSystemURL& url,
719 FileSystemFileUtil** file_util, 719 FileSystemFileUtil** file_util,
720 SetUpMode mode) { 720 SetUpMode mode) {
721 if (!url.is_valid()) 721 if (!url.is_valid())
722 return base::PLATFORM_FILE_ERROR_INVALID_URL; 722 return base::PLATFORM_FILE_ERROR_INVALID_URL;
723 723
724 if (!file_system_context()->GetMountPointProvider( 724 if (!file_system_context()->GetMountPointProvider(
725 url.type())->IsAccessAllowed(url.origin(), url.type(), url.path())) 725 url.type())->IsAccessAllowed(url.origin(), url.type(),
726 url.virtual_path()))
726 return base::PLATFORM_FILE_ERROR_SECURITY; 727 return base::PLATFORM_FILE_ERROR_SECURITY;
727 728
728 DCHECK(file_util); 729 DCHECK(file_util);
729 if (!*file_util) 730 if (!*file_util)
730 *file_util = file_system_context()->GetFileUtil(url.type()); 731 *file_util = file_system_context()->GetFileUtil(url.type());
731 if (!*file_util) 732 if (!*file_util)
732 return base::PLATFORM_FILE_ERROR_SECURITY; 733 return base::PLATFORM_FILE_ERROR_SECURITY;
733 734
734 if (mode == SETUP_FOR_READ) { 735 if (mode == SETUP_FOR_READ) {
735 // We notify this read access whether the read access succeeds or not. 736 // We notify this read access whether the read access succeeds or not.
(...skipping 30 matching lines...) Expand all
766 } 767 }
767 768
768 bool LocalFileSystemOperation::SetPendingOperationType(OperationType type) { 769 bool LocalFileSystemOperation::SetPendingOperationType(OperationType type) {
769 if (pending_operation_ != kOperationNone) 770 if (pending_operation_ != kOperationNone)
770 return false; 771 return false;
771 pending_operation_ = type; 772 pending_operation_ = type;
772 return true; 773 return true;
773 } 774 }
774 775
775 } // namespace fileapi 776 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/isolated_mount_point_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698