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

Side by Side Diff: chrome/browser/chromeos/file_system_provider/provided_file_system.cc

Issue 513683002: [fsp] Add support for providing thumbnails. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments. Created 6 years, 3 months 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/chromeos/file_system_provider/provided_file_system.h" 5 #include "chrome/browser/chromeos/file_system_provider/provided_file_system.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/files/file.h" 10 #include "base/files/file.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 callback.Run(base::File::FILE_ERROR_SECURITY); 71 callback.Run(base::File::FILE_ERROR_SECURITY);
72 return AbortCallback(); 72 return AbortCallback();
73 } 73 }
74 74
75 return base::Bind( 75 return base::Bind(
76 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); 76 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id);
77 } 77 }
78 78
79 ProvidedFileSystem::AbortCallback ProvidedFileSystem::GetMetadata( 79 ProvidedFileSystem::AbortCallback ProvidedFileSystem::GetMetadata(
80 const base::FilePath& entry_path, 80 const base::FilePath& entry_path,
81 MetadataFieldMask fields,
81 const GetMetadataCallback& callback) { 82 const GetMetadataCallback& callback) {
82 const int request_id = request_manager_.CreateRequest( 83 const int request_id = request_manager_.CreateRequest(
83 GET_METADATA, 84 GET_METADATA,
84 scoped_ptr<RequestManager::HandlerInterface>(new operations::GetMetadata( 85 scoped_ptr<RequestManager::HandlerInterface>(new operations::GetMetadata(
85 event_router_, file_system_info_, entry_path, callback))); 86 event_router_, file_system_info_, entry_path, fields, callback)));
86 if (!request_id) { 87 if (!request_id) {
87 callback.Run(EntryMetadata(), base::File::FILE_ERROR_SECURITY); 88 callback.Run(EntryMetadata(), base::File::FILE_ERROR_SECURITY);
88 return AbortCallback(); 89 return AbortCallback();
89 } 90 }
90 91
91 return base::Bind( 92 return base::Bind(
92 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); 93 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id);
93 } 94 }
94 95
95 ProvidedFileSystem::AbortCallback ProvidedFileSystem::ReadDirectory( 96 ProvidedFileSystem::AbortCallback ProvidedFileSystem::ReadDirectory(
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 new operations::Abort(event_router_, 342 new operations::Abort(event_router_,
342 file_system_info_, 343 file_system_info_,
343 operation_request_id, 344 operation_request_id,
344 callback)))) { 345 callback)))) {
345 callback.Run(base::File::FILE_ERROR_SECURITY); 346 callback.Run(base::File::FILE_ERROR_SECURITY);
346 } 347 }
347 } 348 }
348 349
349 } // namespace file_system_provider 350 } // namespace file_system_provider
350 } // namespace chromeos 351 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698