| 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/common/fileapi/file_system_util.h" | 5 #include "webkit/common/fileapi/file_system_util.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 case base::PLATFORM_FILE_ERROR_ACCESS_DENIED: | 289 case base::PLATFORM_FILE_ERROR_ACCESS_DENIED: |
| 290 return WebKit::WebFileErrorNoModificationAllowed; | 290 return WebKit::WebFileErrorNoModificationAllowed; |
| 291 case base::PLATFORM_FILE_ERROR_FAILED: | 291 case base::PLATFORM_FILE_ERROR_FAILED: |
| 292 return WebKit::WebFileErrorInvalidState; | 292 return WebKit::WebFileErrorInvalidState; |
| 293 case base::PLATFORM_FILE_ERROR_ABORT: | 293 case base::PLATFORM_FILE_ERROR_ABORT: |
| 294 return WebKit::WebFileErrorAbort; | 294 return WebKit::WebFileErrorAbort; |
| 295 case base::PLATFORM_FILE_ERROR_SECURITY: | 295 case base::PLATFORM_FILE_ERROR_SECURITY: |
| 296 return WebKit::WebFileErrorSecurity; | 296 return WebKit::WebFileErrorSecurity; |
| 297 case base::PLATFORM_FILE_ERROR_NO_SPACE: | 297 case base::PLATFORM_FILE_ERROR_NO_SPACE: |
| 298 return WebKit::WebFileErrorQuotaExceeded; | 298 return WebKit::WebFileErrorQuotaExceeded; |
| 299 case base::PLATFORM_FILE_ERROR_INVALID_URL: |
| 300 return WebKit::WebFileErrorEncoding; |
| 299 default: | 301 default: |
| 300 return WebKit::WebFileErrorInvalidModification; | 302 return WebKit::WebFileErrorInvalidModification; |
| 301 } | 303 } |
| 302 } | 304 } |
| 303 | 305 |
| 304 bool GetFileSystemPublicType( | 306 bool GetFileSystemPublicType( |
| 305 const std::string type_string, | 307 const std::string type_string, |
| 306 WebKit::WebFileSystemType* type | 308 WebKit::WebFileSystemType* type |
| 307 ) { | 309 ) { |
| 308 DCHECK(type); | 310 DCHECK(type); |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 std::string root = GetFileSystemRootURI(origin_url, | 390 std::string root = GetFileSystemRootURI(origin_url, |
| 389 kFileSystemTypeExternal).spec(); | 391 kFileSystemTypeExternal).spec(); |
| 390 if (base::FilePath::FromUTF8Unsafe(mount_name).ReferencesParent()) | 392 if (base::FilePath::FromUTF8Unsafe(mount_name).ReferencesParent()) |
| 391 return std::string(); | 393 return std::string(); |
| 392 root.append(mount_name); | 394 root.append(mount_name); |
| 393 root.append("/"); | 395 root.append("/"); |
| 394 return root; | 396 return root; |
| 395 } | 397 } |
| 396 | 398 |
| 397 } // namespace fileapi | 399 } // namespace fileapi |
| OLD | NEW |