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

Side by Side Diff: storage/browser/fileapi/file_system_context.cc

Issue 1455403003: Add an option to specify requested fields for fetching metadata. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleaned up. Created 5 years, 1 month 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
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 "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
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
OLDNEW
« no previous file with comments | « storage/browser/fileapi/copy_or_move_operation_delegate.cc ('k') | storage/browser/fileapi/file_system_dir_url_request_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698