| OLD | NEW |
| 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/browser/fileapi/test_mount_point_provider.h" | 5 #include "webkit/browser/fileapi/test_mount_point_provider.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 *error_code = base::PLATFORM_FILE_OK; | 129 *error_code = base::PLATFORM_FILE_OK; |
| 130 if (require_copy_or_move_validator_) { | 130 if (require_copy_or_move_validator_) { |
| 131 if (!copy_or_move_file_validator_factory_) | 131 if (!copy_or_move_file_validator_factory_) |
| 132 *error_code = base::PLATFORM_FILE_ERROR_SECURITY; | 132 *error_code = base::PLATFORM_FILE_ERROR_SECURITY; |
| 133 return copy_or_move_file_validator_factory_.get(); | 133 return copy_or_move_file_validator_factory_.get(); |
| 134 } | 134 } |
| 135 return NULL; | 135 return NULL; |
| 136 } | 136 } |
| 137 | 137 |
| 138 void TestMountPointProvider::InitializeCopyOrMoveFileValidatorFactory( | 138 void TestMountPointProvider::InitializeCopyOrMoveFileValidatorFactory( |
| 139 FileSystemType type, scoped_ptr<CopyOrMoveFileValidatorFactory> factory) { | 139 scoped_ptr<CopyOrMoveFileValidatorFactory> factory) { |
| 140 if (!require_copy_or_move_validator_) { | 140 if (!require_copy_or_move_validator_) { |
| 141 DCHECK(!factory); | 141 DCHECK(!factory); |
| 142 return; | 142 return; |
| 143 } | 143 } |
| 144 if (!copy_or_move_file_validator_factory_) | 144 if (!copy_or_move_file_validator_factory_) |
| 145 copy_or_move_file_validator_factory_ = factory.Pass(); | 145 copy_or_move_file_validator_factory_ = factory.Pass(); |
| 146 } | 146 } |
| 147 | 147 |
| 148 FilePermissionPolicy TestMountPointProvider::GetPermissionPolicy( | 148 FilePermissionPolicy TestMountPointProvider::GetPermissionPolicy( |
| 149 const FileSystemURL& url, int permissions) const { | 149 const FileSystemURL& url, int permissions) const { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 NOTREACHED(); | 194 NOTREACHED(); |
| 195 callback.Run(base::PLATFORM_FILE_ERROR_INVALID_OPERATION); | 195 callback.Run(base::PLATFORM_FILE_ERROR_INVALID_OPERATION); |
| 196 } | 196 } |
| 197 | 197 |
| 198 const UpdateObserverList* TestMountPointProvider::GetUpdateObservers( | 198 const UpdateObserverList* TestMountPointProvider::GetUpdateObservers( |
| 199 FileSystemType type) const { | 199 FileSystemType type) const { |
| 200 return &observers_; | 200 return &observers_; |
| 201 } | 201 } |
| 202 | 202 |
| 203 } // namespace fileapi | 203 } // namespace fileapi |
| OLD | NEW |