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

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

Issue 10873055: Changed FileSystemPointProvider::IsAcccessAllowed() to take a single FileSystemURL instead of a tri… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix for typos from Kinuko's review. Sorry, I will look more closely at my own diff next time Created 8 years, 3 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 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(), 725 url.type())->IsAccessAllowed(url))
726 url.virtual_path()))
727 return base::PLATFORM_FILE_ERROR_SECURITY; 726 return base::PLATFORM_FILE_ERROR_SECURITY;
728 727
729 DCHECK(file_util); 728 DCHECK(file_util);
730 if (!*file_util) 729 if (!*file_util)
731 *file_util = file_system_context()->GetFileUtil(url.type()); 730 *file_util = file_system_context()->GetFileUtil(url.type());
732 if (!*file_util) 731 if (!*file_util)
733 return base::PLATFORM_FILE_ERROR_SECURITY; 732 return base::PLATFORM_FILE_ERROR_SECURITY;
734 733
735 if (mode == SETUP_FOR_READ) { 734 if (mode == SETUP_FOR_READ) {
736 // We notify this read access whether the read access succeeds or not. 735 // We notify this read access whether the read access succeeds or not.
(...skipping 30 matching lines...) Expand all
767 } 766 }
768 767
769 bool LocalFileSystemOperation::SetPendingOperationType(OperationType type) { 768 bool LocalFileSystemOperation::SetPendingOperationType(OperationType type) {
770 if (pending_operation_ != kOperationNone) 769 if (pending_operation_ != kOperationNone)
771 return false; 770 return false;
772 pending_operation_ = type; 771 pending_operation_ = type;
773 return true; 772 return true;
774 } 773 }
775 774
776 } // namespace fileapi 775 } // namespace fileapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698