1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208
|
// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ash/smb_client/smb_file_system.h"
#include <memory>
#include "base/notreached.h"
#include "chrome/browser/ash/file_system_provider/service.h"
#include "chrome/browser/ash/smb_client/smb_file_system_id.h"
#include "components/services/filesystem/public/mojom/types.mojom.h"
namespace ash::smb_client {
using file_system_provider::AbortCallback;
SmbFileSystem::SmbFileSystem(
const file_system_provider::ProvidedFileSystemInfo& file_system_info)
: file_system_info_(file_system_info) {}
SmbFileSystem::~SmbFileSystem() = default;
AbortCallback SmbFileSystem::RequestUnmount(
storage::AsyncFileUtil::StatusCallback callback) {
NOTREACHED();
}
AbortCallback SmbFileSystem::GetMetadata(
const base::FilePath& entry_path,
ProvidedFileSystemInterface::MetadataFieldMask fields,
ProvidedFileSystemInterface::GetMetadataCallback callback) {
NOTREACHED();
}
AbortCallback SmbFileSystem::GetActions(
const std::vector<base::FilePath>& entry_paths,
GetActionsCallback callback) {
const std::vector<file_system_provider::Action> actions;
// No actions are currently supported.
std::move(callback).Run(actions, base::File::FILE_OK);
return base::DoNothing();
}
AbortCallback SmbFileSystem::ExecuteAction(
const std::vector<base::FilePath>& entry_paths,
const std::string& action_id,
storage::AsyncFileUtil::StatusCallback callback) {
NOTREACHED();
}
AbortCallback SmbFileSystem::ReadDirectory(
const base::FilePath& directory_path,
storage::AsyncFileUtil::ReadDirectoryCallback callback) {
NOTREACHED();
}
AbortCallback SmbFileSystem::OpenFile(const base::FilePath& file_path,
file_system_provider::OpenFileMode mode,
OpenFileCallback callback) {
NOTREACHED();
}
AbortCallback SmbFileSystem::CloseFile(
int file_handle,
storage::AsyncFileUtil::StatusCallback callback) {
NOTREACHED();
}
AbortCallback SmbFileSystem::ReadFile(int file_handle,
net::IOBuffer* buffer,
int64_t offset,
int length,
ReadChunkReceivedCallback callback) {
NOTREACHED();
}
AbortCallback SmbFileSystem::CreateDirectory(
const base::FilePath& directory_path,
bool recursive,
storage::AsyncFileUtil::StatusCallback callback) {
NOTREACHED();
}
AbortCallback SmbFileSystem::CreateFile(
const base::FilePath& file_path,
storage::AsyncFileUtil::StatusCallback callback) {
NOTREACHED();
}
AbortCallback SmbFileSystem::DeleteEntry(
const base::FilePath& entry_path,
bool recursive,
storage::AsyncFileUtil::StatusCallback callback) {
NOTREACHED();
}
AbortCallback SmbFileSystem::CopyEntry(
const base::FilePath& source_path,
const base::FilePath& target_path,
storage::AsyncFileUtil::StatusCallback callback) {
NOTREACHED();
}
AbortCallback SmbFileSystem::MoveEntry(
const base::FilePath& source_path,
const base::FilePath& target_path,
storage::AsyncFileUtil::StatusCallback callback) {
NOTREACHED();
}
AbortCallback SmbFileSystem::Truncate(
const base::FilePath& file_path,
int64_t length,
storage::AsyncFileUtil::StatusCallback callback) {
NOTREACHED();
}
AbortCallback SmbFileSystem::WriteFile(
int file_handle,
net::IOBuffer* buffer,
int64_t offset,
int length,
storage::AsyncFileUtil::StatusCallback callback) {
NOTREACHED();
}
AbortCallback SmbFileSystem::FlushFile(
int file_handle,
storage::AsyncFileUtil::StatusCallback callback) {
NOTREACHED();
}
AbortCallback SmbFileSystem::AddWatcher(
const GURL& origin,
const base::FilePath& entry_path,
bool recursive,
bool persistent,
storage::AsyncFileUtil::StatusCallback callback,
storage::WatcherManager::NotificationCallback notification_callback) {
// Watchers are not supported.
NOTREACHED();
}
void SmbFileSystem::RemoveWatcher(
const GURL& origin,
const base::FilePath& entry_path,
bool recursive,
storage::AsyncFileUtil::StatusCallback callback) {
// Watchers are not supported.
NOTREACHED();
}
const file_system_provider::ProvidedFileSystemInfo&
SmbFileSystem::GetFileSystemInfo() const {
return file_system_info_;
}
file_system_provider::OperationRequestManager*
SmbFileSystem::GetRequestManager() {
NOTREACHED();
}
file_system_provider::Watchers* SmbFileSystem::GetWatchers() {
// Watchers are not supported.
NOTREACHED();
}
const file_system_provider::OpenedFiles& SmbFileSystem::GetOpenedFiles() const {
NOTREACHED();
}
void SmbFileSystem::AddObserver(
file_system_provider::ProvidedFileSystemObserver* observer) {
NOTREACHED();
}
void SmbFileSystem::RemoveObserver(
file_system_provider::ProvidedFileSystemObserver* observer) {
NOTREACHED();
}
void SmbFileSystem::SmbFileSystem::Notify(
const base::FilePath& entry_path,
bool recursive,
storage::WatcherManager::ChangeType change_type,
std::unique_ptr<file_system_provider::ProvidedFileSystemObserver::Changes>
changes,
const std::string& tag,
storage::AsyncFileUtil::StatusCallback callback) {
NOTREACHED();
}
void SmbFileSystem::Configure(storage::AsyncFileUtil::StatusCallback callback) {
NOTREACHED();
}
base::WeakPtr<file_system_provider::ProvidedFileSystemInterface>
SmbFileSystem::GetWeakPtr() {
return weak_ptr_factory_.GetWeakPtr();
}
std::unique_ptr<file_system_provider::ScopedUserInteraction>
SmbFileSystem::StartUserInteraction() {
NOTREACHED();
}
} // namespace ash::smb_client
|