| Index: chrome/browser/chromeos/file_system_provider/provided_file_system_info.h
|
| diff --git a/chrome/browser/chromeos/file_system_provider/provided_file_system_info.h b/chrome/browser/chromeos/file_system_provider/provided_file_system_info.h
|
| index f2b51e6e8d4a698a5448aeeb673b3b7d2307040b..7a906b90a7b90e8cb310890c8e485c10ad7912f6 100644
|
| --- a/chrome/browser/chromeos/file_system_provider/provided_file_system_info.h
|
| +++ b/chrome/browser/chromeos/file_system_provider/provided_file_system_info.h
|
| @@ -9,6 +9,7 @@
|
|
|
| #include "base/files/file_path.h"
|
| #include "chrome/common/extensions/api/file_system_provider_capabilities/file_system_provider_capabilities_handler.h"
|
| +#include "chrome/browser/chromeos/file_system_provider/provided_file_system_defs.h"
|
|
|
| namespace chromeos {
|
| namespace file_system_provider {
|
| @@ -33,15 +34,27 @@ class ProvidedFileSystemInfo {
|
| public:
|
| ProvidedFileSystemInfo();
|
|
|
| - ProvidedFileSystemInfo(const std::string& extension_id,
|
| + ProvidedFileSystemInfo(const std::string& source_id,
|
| const MountOptions& mount_options,
|
| const base::FilePath& mount_path,
|
| bool configurable,
|
| - extensions::FileSystemProviderSource source);
|
| + extensions::FileSystemProviderSource source,
|
| + Source_Type type = Source_Type::extension);
|
|
|
| ~ProvidedFileSystemInfo();
|
|
|
| - const std::string& extension_id() const { return extension_id_; }
|
| + // return the source or an empty string if the source type
|
| + // is not the same as the expected one
|
| + const std::string extension_id() const {
|
| + return get_source_id(Source_Type::extension);
|
| + }
|
| + const std::string plugin_id() const {
|
| + return get_source_id(Source_Type::plugin);
|
| + }
|
| + const std::string source_id() const { return get_source_id(source_type_); }
|
| +
|
| + Source_Type source_type() const { return source_type_; }
|
| +
|
| const std::string& file_system_id() const { return file_system_id_; }
|
| const std::string& display_name() const { return display_name_; }
|
| bool writable() const { return writable_; }
|
| @@ -52,8 +65,10 @@ class ProvidedFileSystemInfo {
|
| extensions::FileSystemProviderSource source() const { return source_; }
|
|
|
| private:
|
| - // ID of the extension providing this file system.
|
| - std::string extension_id_;
|
| + // Return the source that is providing the file system
|
| + const std::string get_source_id(Source_Type type) const;
|
| + // ID of the source providing this file system.
|
| + std::string source_id_;
|
|
|
| // ID of the file system.
|
| std::string file_system_id_;
|
| @@ -78,6 +93,8 @@ class ProvidedFileSystemInfo {
|
|
|
| // Source of the file system's data.
|
| extensions::FileSystemProviderSource source_;
|
| + // The source of the filesystem
|
| + Source_Type source_type_;
|
| };
|
|
|
| } // namespace file_system_provider
|
|
|