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 "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/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "base/task_runner_util.h" | 10 #include "base/task_runner_util.h" |
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 base::FilePath child = url.virtual_path(); | 619 base::FilePath child = url.virtual_path(); |
620 base::FilePath path; | 620 base::FilePath path; |
621 | 621 |
622 if (parent.empty()) { | 622 if (parent.empty()) { |
623 path = child; | 623 path = child; |
624 } else if (parent != child) { | 624 } else if (parent != child) { |
625 bool result = parent.AppendRelativePath(child, &path); | 625 bool result = parent.AppendRelativePath(child, &path); |
626 DCHECK(result); | 626 DCHECK(result); |
627 } | 627 } |
628 | 628 |
| 629 // TODO(mtomasz): Not all fields should be required for ResolveURL. |
629 operation_runner()->GetMetadata( | 630 operation_runner()->GetMetadata( |
630 url, base::Bind(&DidGetMetadataForResolveURL, path, callback, info)); | 631 url, FileSystemOperation::GET_METADATA_FIELD_IS_DIRECTORY | |
| 632 FileSystemOperation::GET_METADATA_FIELD_SIZE | |
| 633 FileSystemOperation::GET_METADATA_FIELD_LAST_MODIFIED, |
| 634 base::Bind(&DidGetMetadataForResolveURL, path, callback, info)); |
631 } | 635 } |
632 | 636 |
633 } // namespace storage | 637 } // namespace storage |
OLD | NEW |