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 53a610f8a4fc8201fa5a1c604e195097c4f9a2b5..a63cded08616c06020a16a5d7f79b48d913a18f1 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 |
@@ -8,6 +8,7 @@ |
#include <string> |
#include "base/files/file_path.h" |
+#include "chrome/browser/chromeos/file_system_provider/provided_file_system_defs.h" |
namespace chromeos { |
namespace file_system_provider { |
@@ -36,13 +37,25 @@ 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); |
+ const base::FilePath& mount_path, |
+ 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 { |
const base::FilePath& mount_path() const { return mount_path_; } |
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_; |
@@ -75,6 +90,9 @@ class ProvidedFileSystemInfo { |
// Mount path of the underlying file system. |
base::FilePath mount_path_; |
+ |
+ // The source of the filesystem |
+ Source_Type source_type_; |
}; |
} // namespace file_system_provider |