Chromium Code Reviews| Index: chrome/browser/chromeos/file_system_provider/fake_provided_file_system.h |
| diff --git a/chrome/browser/chromeos/file_system_provider/fake_provided_file_system.h b/chrome/browser/chromeos/file_system_provider/fake_provided_file_system.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..8bac4e82af3ebe59726a60fece2bab0623ae85ea |
| --- /dev/null |
| +++ b/chrome/browser/chromeos/file_system_provider/fake_provided_file_system.h |
| @@ -0,0 +1,59 @@ |
| +// 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. |
| + |
| +#ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTEM_H_ |
| +#define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTEM_H_ |
| + |
| +#include <string> |
| + |
| +#include "base/files/file_path.h" |
| +#include "chrome/browser/chromeos/file_system_provider/provided_file_system_info.h" |
| +#include "chrome/browser/chromeos/file_system_provider/provided_file_system_interface.h" |
| + |
| +class Profile; |
| + |
| +namespace chromeos { |
| +namespace file_system_provider { |
| + |
| +class RequestManager; |
| + |
| +// Fake provided file system implementation. Does not communicate with target |
| +// extensions. Used for unit tests. |
| +class FakeProvidedFileSystem : public ProvidedFileSystemInterface { |
| + public: |
| + FakeProvidedFileSystem(); |
|
hashimoto
2014/04/14 10:43:42
Why is this ctor there?
mtomasz
2014/04/15 02:46:40
Not necessary. Done.
|
| + explicit FakeProvidedFileSystem( |
| + const ProvidedFileSystemInfo& file_system_info); |
| + virtual ~FakeProvidedFileSystem(); |
| + |
| + // ProvidedFileSystemInterface overrides. |
| + virtual bool RequestUnmount( |
| + const fileapi::AsyncFileUtil::StatusCallback& callback) OVERRIDE; |
| + virtual const ProvidedFileSystemInfo& GetFileSystemInfo() const OVERRIDE; |
| + |
| + private: |
| + ProvidedFileSystemInfo file_system_info_; |
| + DISALLOW_COPY_AND_ASSIGN(FakeProvidedFileSystem); |
| +}; |
| + |
| +// Factory creating fake provided file system instances. |
| +class FakeProvidedFileSystemFactory |
| + : public ProvidedFileSystemFactoryInterface { |
| + public: |
| + FakeProvidedFileSystemFactory(); |
| + |
| + // ProvidedFileSystemFactoryInterface overrides. |
| + virtual ProvidedFileSystemInterface* Create( |
| + Profile* profile, |
| + RequestManager* request_manager, |
| + const ProvidedFileSystemInfo& file_system_info) OVERRIDE; |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(FakeProvidedFileSystemFactory); |
| +}; |
| + |
| +} // namespace file_system_provider |
| +} // namespace chromeos |
| + |
| +#endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTEM_H_ |