| Index: chrome/browser/chromeos/file_system_provider/fake_provided_file_system.cc
|
| diff --git a/chrome/browser/chromeos/file_system_provider/fake_provided_file_system.cc b/chrome/browser/chromeos/file_system_provider/fake_provided_file_system.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e2cb156ff616531433857f5b5d24d93658871f8c
|
| --- /dev/null
|
| +++ b/chrome/browser/chromeos/file_system_provider/fake_provided_file_system.cc
|
| @@ -0,0 +1,47 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "chrome/browser/chromeos/file_system_provider/fake_provided_file_system.h"
|
| +
|
| +#include "base/files/file.h"
|
| +#include "chrome/browser/chromeos/file_system_provider/request_manager.h"
|
| +#include "chrome/browser/profiles/profile.h"
|
| +
|
| +namespace chromeos {
|
| +namespace file_system_provider {
|
| +
|
| +FakeProvidedFileSystem::FakeProvidedFileSystem(
|
| + const ProvidedFileSystemInfo& file_system_info)
|
| + : file_system_info_(file_system_info) {}
|
| +
|
| +FakeProvidedFileSystem::~FakeProvidedFileSystem() {}
|
| +
|
| +bool FakeProvidedFileSystem::RequestUnmount(
|
| + const fileapi::AsyncFileUtil::StatusCallback& callback) {
|
| + callback.Run(base::File::FILE_OK);
|
| + return true;
|
| +}
|
| +
|
| +const ProvidedFileSystemInfo& FakeProvidedFileSystem::GetFileSystemInfo()
|
| + const {
|
| + return file_system_info_;
|
| +}
|
| +
|
| +FakeProvidedFileSystemFactory::FakeProvidedFileSystemFactory() {}
|
| +
|
| +ProvidedFileSystemInterface* FakeProvidedFileSystemFactory::Create(
|
| + Profile* profile,
|
| + RequestManager* request_manager,
|
| + const ProvidedFileSystemInfo& file_system_info) {
|
| + DCHECK(profile);
|
| + DCHECK(request_manager);
|
| + // TODO(mtomasz): Create a request manager in ProvidedFileSystem, since it is
|
| + // only used by ProvidedFileSystem, instead of having a profile wide one.
|
| + // As a result, there will be no need to pass the request manager to
|
| + // ProvidedFileSystemInterface::Create().
|
| + return new FakeProvidedFileSystem(file_system_info);
|
| +}
|
| +
|
| +} // namespace file_system_provider
|
| +} // namespace chromeos
|
|
|