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

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: Use scoped_ptr for EntryMetadata. 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(make_scoped_ptr<EntryMetadata>(NULL),
89 base::File::FILE_ERROR_SECURITY);
88 return AbortCallback(); 90 return AbortCallback();
89 } 91 }
90 92
91 return base::Bind( 93 return base::Bind(
92 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); 94 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id);
93 } 95 }
94 96
95 ProvidedFileSystem::AbortCallback ProvidedFileSystem::ReadDirectory( 97 ProvidedFileSystem::AbortCallback ProvidedFileSystem::ReadDirectory(
96 const base::FilePath& directory_path, 98 const base::FilePath& directory_path,
97 const storage::AsyncFileUtil::ReadDirectoryCallback& callback) { 99 const storage::AsyncFileUtil::ReadDirectoryCallback& callback) {
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 new operations::Abort(event_router_, 343 new operations::Abort(event_router_,
342 file_system_info_, 344 file_system_info_,
343 operation_request_id, 345 operation_request_id,
344 callback)))) { 346 callback)))) {
345 callback.Run(base::File::FILE_ERROR_SECURITY); 347 callback.Run(base::File::FILE_ERROR_SECURITY);
346 } 348 }
347 } 349 }
348 350
349 } // namespace file_system_provider 351 } // namespace file_system_provider
350 } // namespace chromeos 352 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698