Index: chrome/browser/chromeos/file_system_provider/service.h |
diff --git a/chrome/browser/chromeos/file_system_provider/service.h b/chrome/browser/chromeos/file_system_provider/service.h |
index d98276792617c458e134684df3c85fbab91a5229..ea452b63603cd73b3cf5399ba4da5bee1637f0a3 100644 |
--- a/chrome/browser/chromeos/file_system_provider/service.h |
+++ b/chrome/browser/chromeos/file_system_provider/service.h |
@@ -29,6 +29,10 @@ class EventRouter; |
class ExtensionRegistry; |
} // namespace extensions |
+namespace user_prefs { |
+class PrefRegistrySyncable; |
+} // namespace user_prefs |
+ |
namespace chromeos { |
namespace file_system_provider { |
@@ -37,6 +41,9 @@ class ProvidedFileSystemInfo; |
class ProvidedFileSystemInterface; |
class ServiceFactory; |
+// Registers preferences to remember registered file systems between reboots. |
+void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
+ |
// Manages and registers the file system provider service. Maintains provided |
// file systems. |
class Service : public KeyedService, |
@@ -99,6 +106,9 @@ class Service : public KeyedService, |
content::BrowserContext* browser_context, |
const extensions::Extension* extension, |
extensions::UnloadedExtensionInfo::Reason reason) OVERRIDE; |
+ virtual void OnExtensionLoaded( |
+ content::BrowserContext* browser_context, |
+ const extensions::Extension* extension) OVERRIDE; |
private: |
// Key is a pair of an extension id and file system id, which makes it |
@@ -114,6 +124,18 @@ class Service : public KeyedService, |
void OnRequestUnmountStatus(const ProvidedFileSystemInfo& file_system_info, |
base::File::Error error); |
+ // Saves a list of currently mounted file systems to preferences. Called |
+ // from a destructor (on shutdown). |
+ void RememberFileSystems(); |
+ |
+ // Removes all of the file systems mounted by the |extension_id| from |
+ // preferences, so they are not loaded again after reboot. |
+ void ForgetFileSystems(const std::string& extension_id); |
+ |
+ // Restores from preferences file systems mounted previously by the |
+ // |extension_id| providing extension. |
+ void RestoreFileSystems(const std::string& extension_id); |
+ |
Profile* profile_; |
extensions::ExtensionRegistry* extension_registry_; // Not owned. |
FileSystemFactoryCallback file_system_factory_; |