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

Side by Side Diff: chrome/browser/chromeos/file_system_provider/fake_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: Fixed a bug. 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/fake_provided_file_system .h" 5 #include "chrome/browser/chromeos/file_system_provider/fake_provided_file_system .h"
6 6
7 #include "base/files/file.h" 7 #include "base/files/file.h"
8 #include "base/message_loop/message_loop_proxy.h" 8 #include "base/message_loop/message_loop_proxy.h"
9 #include "net/base/io_buffer.h" 9 #include "net/base/io_buffer.h"
10 10
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 } 74 }
75 75
76 ProvidedFileSystemInterface::AbortCallback 76 ProvidedFileSystemInterface::AbortCallback
77 FakeProvidedFileSystem::RequestUnmount( 77 FakeProvidedFileSystem::RequestUnmount(
78 const storage::AsyncFileUtil::StatusCallback& callback) { 78 const storage::AsyncFileUtil::StatusCallback& callback) {
79 return PostAbortableTask(base::Bind(callback, base::File::FILE_OK)); 79 return PostAbortableTask(base::Bind(callback, base::File::FILE_OK));
80 } 80 }
81 81
82 ProvidedFileSystemInterface::AbortCallback FakeProvidedFileSystem::GetMetadata( 82 ProvidedFileSystemInterface::AbortCallback FakeProvidedFileSystem::GetMetadata(
83 const base::FilePath& entry_path, 83 const base::FilePath& entry_path,
84 ProvidedFileSystemInterface::MetadataFieldMask fields,
84 const ProvidedFileSystemInterface::GetMetadataCallback& callback) { 85 const ProvidedFileSystemInterface::GetMetadataCallback& callback) {
85 const Entries::const_iterator entry_it = entries_.find(entry_path); 86 const Entries::const_iterator entry_it = entries_.find(entry_path);
86 87
87 if (entry_it == entries_.end()) { 88 if (entry_it == entries_.end()) {
88 return PostAbortableTask(base::Bind( 89 return PostAbortableTask(base::Bind(
89 callback, EntryMetadata(), base::File::FILE_ERROR_NOT_FOUND)); 90 callback, EntryMetadata(), base::File::FILE_ERROR_NOT_FOUND));
90 } 91 }
91 92
92 return PostAbortableTask( 93 return PostAbortableTask(
93 base::Bind(callback, entry_it->second.metadata, base::File::FILE_OK)); 94 base::Bind(callback, entry_it->second.metadata, base::File::FILE_OK));
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 const std::vector<int>& task_ids, 341 const std::vector<int>& task_ids,
341 const storage::AsyncFileUtil::StatusCallback& callback) { 342 const storage::AsyncFileUtil::StatusCallback& callback) {
342 for (size_t i = 0; i < task_ids.size(); ++i) { 343 for (size_t i = 0; i < task_ids.size(); ++i) {
343 tracker_.TryCancel(task_ids[i]); 344 tracker_.TryCancel(task_ids[i]);
344 } 345 }
345 callback.Run(base::File::FILE_OK); 346 callback.Run(base::File::FILE_OK);
346 } 347 }
347 348
348 } // namespace file_system_provider 349 } // namespace file_system_provider
349 } // namespace chromeos 350 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698