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

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

Issue 1239043002: Add support for actions for multiple file selection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed externs. Created 5 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/thread_task_runner_handle.h" 7 #include "base/thread_task_runner_handle.h"
8 #include "net/base/io_buffer.h" 8 #include "net/base/io_buffer.h"
9 9
10 namespace chromeos { 10 namespace chromeos {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 metadata->size = entry_it->second->metadata->size; 103 metadata->size = entry_it->second->metadata->size;
104 metadata->modification_time = entry_it->second->metadata->modification_time; 104 metadata->modification_time = entry_it->second->metadata->modification_time;
105 metadata->mime_type = entry_it->second->metadata->mime_type; 105 metadata->mime_type = entry_it->second->metadata->mime_type;
106 metadata->thumbnail = entry_it->second->metadata->thumbnail; 106 metadata->thumbnail = entry_it->second->metadata->thumbnail;
107 107
108 return PostAbortableTask( 108 return PostAbortableTask(
109 base::Bind(callback, base::Passed(&metadata), base::File::FILE_OK)); 109 base::Bind(callback, base::Passed(&metadata), base::File::FILE_OK));
110 } 110 }
111 111
112 AbortCallback FakeProvidedFileSystem::GetActions( 112 AbortCallback FakeProvidedFileSystem::GetActions(
113 const base::FilePath& entry_path, 113 const std::vector<base::FilePath>& entry_paths,
114 const ProvidedFileSystemInterface::GetActionsCallback& callback) { 114 const ProvidedFileSystemInterface::GetActionsCallback& callback) {
115 // TODO(mtomasz): Implement it once needed. 115 // TODO(mtomasz): Implement it once needed.
116 const std::vector<Action> actions; 116 const std::vector<Action> actions;
117 return PostAbortableTask(base::Bind(callback, actions, base::File::FILE_OK)); 117 return PostAbortableTask(base::Bind(callback, actions, base::File::FILE_OK));
118 } 118 }
119 119
120 AbortCallback FakeProvidedFileSystem::ExecuteAction( 120 AbortCallback FakeProvidedFileSystem::ExecuteAction(
121 const base::FilePath& entry_path, 121 const std::vector<base::FilePath>& entry_paths,
122 const std::string& action_id, 122 const std::string& action_id,
123 const storage::AsyncFileUtil::StatusCallback& callback) { 123 const storage::AsyncFileUtil::StatusCallback& callback) {
124 // TODO(mtomasz): Implement it once needed. 124 // TODO(mtomasz): Implement it once needed.
125 return PostAbortableTask(base::Bind(callback, base::File::FILE_OK)); 125 return PostAbortableTask(base::Bind(callback, base::File::FILE_OK));
126 } 126 }
127 127
128 AbortCallback FakeProvidedFileSystem::ReadDirectory( 128 AbortCallback FakeProvidedFileSystem::ReadDirectory(
129 const base::FilePath& directory_path, 129 const base::FilePath& directory_path,
130 const storage::AsyncFileUtil::ReadDirectoryCallback& callback) { 130 const storage::AsyncFileUtil::ReadDirectoryCallback& callback) {
131 storage::AsyncFileUtil::EntryList entry_list; 131 storage::AsyncFileUtil::EntryList entry_list;
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 } 417 }
418 418
419 void FakeProvidedFileSystem::AbortMany(const std::vector<int>& task_ids) { 419 void FakeProvidedFileSystem::AbortMany(const std::vector<int>& task_ids) {
420 for (size_t i = 0; i < task_ids.size(); ++i) { 420 for (size_t i = 0; i < task_ids.size(); ++i) {
421 tracker_.TryCancel(task_ids[i]); 421 tracker_.TryCancel(task_ids[i]);
422 } 422 }
423 } 423 }
424 424
425 } // namespace file_system_provider 425 } // namespace file_system_provider
426 } // namespace chromeos 426 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698