| 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 "storage/browser/fileapi/file_system_context.h" | 5 #include "storage/browser/fileapi/file_system_context.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 return CrackFileSystemURL(FileSystemURL(url)); | 476 return CrackFileSystemURL(FileSystemURL(url)); |
| 477 } | 477 } |
| 478 | 478 |
| 479 FileSystemURL FileSystemContext::CreateCrackedFileSystemURL( | 479 FileSystemURL FileSystemContext::CreateCrackedFileSystemURL( |
| 480 const GURL& origin, | 480 const GURL& origin, |
| 481 FileSystemType type, | 481 FileSystemType type, |
| 482 const base::FilePath& path) const { | 482 const base::FilePath& path) const { |
| 483 return CrackFileSystemURL(FileSystemURL(origin, type, path)); | 483 return CrackFileSystemURL(FileSystemURL(origin, type, path)); |
| 484 } | 484 } |
| 485 | 485 |
| 486 #if defined(OS_CHROMEOS) | |
| 487 void FileSystemContext::EnableTemporaryFileSystemInIncognito() { | 486 void FileSystemContext::EnableTemporaryFileSystemInIncognito() { |
| 488 sandbox_backend_->set_enable_temporary_file_system_in_incognito(true); | 487 sandbox_backend_->set_enable_temporary_file_system_in_incognito(true); |
| 489 } | 488 } |
| 490 #endif | |
| 491 | 489 |
| 492 bool FileSystemContext::CanServeURLRequest(const FileSystemURL& url) const { | 490 bool FileSystemContext::CanServeURLRequest(const FileSystemURL& url) const { |
| 493 // We never support accessing files in isolated filesystems via an URL. | 491 // We never support accessing files in isolated filesystems via an URL. |
| 494 if (url.mount_type() == kFileSystemTypeIsolated) | 492 if (url.mount_type() == kFileSystemTypeIsolated) |
| 495 return false; | 493 return false; |
| 496 #if defined(OS_CHROMEOS) | 494 #if defined(OS_CHROMEOS) |
| 497 if (url.type() == kFileSystemTypeTemporary && | 495 if (url.type() == kFileSystemTypeTemporary && |
| 498 sandbox_backend_->enable_temporary_file_system_in_incognito()) { | 496 sandbox_backend_->enable_temporary_file_system_in_incognito()) { |
| 499 return true; | 497 return true; |
| 500 } | 498 } |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 | 632 |
| 635 // TODO(mtomasz): Not all fields should be required for ResolveURL. | 633 // TODO(mtomasz): Not all fields should be required for ResolveURL. |
| 636 operation_runner()->GetMetadata( | 634 operation_runner()->GetMetadata( |
| 637 url, FileSystemOperation::GET_METADATA_FIELD_IS_DIRECTORY | | 635 url, FileSystemOperation::GET_METADATA_FIELD_IS_DIRECTORY | |
| 638 FileSystemOperation::GET_METADATA_FIELD_SIZE | | 636 FileSystemOperation::GET_METADATA_FIELD_SIZE | |
| 639 FileSystemOperation::GET_METADATA_FIELD_LAST_MODIFIED, | 637 FileSystemOperation::GET_METADATA_FIELD_LAST_MODIFIED, |
| 640 base::Bind(&DidGetMetadataForResolveURL, path, callback, info)); | 638 base::Bind(&DidGetMetadataForResolveURL, path, callback, info)); |
| 641 } | 639 } |
| 642 | 640 |
| 643 } // namespace storage | 641 } // namespace storage |
| OLD | NEW |