Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Unified Diff: chrome/browser/chromeos/file_system_provider/service.h

Issue 334263017: [fsp] Remember mounted file systems as soon as possible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated a comment. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 fd82863683fdf3e72366a3f4320e0933064acd9e..5c7f8c042d31131396b4a517b6b35a184f3db5d1 100644
--- a/chrome/browser/chromeos/file_system_provider/service.h
+++ b/chrome/browser/chromeos/file_system_provider/service.h
@@ -58,6 +58,11 @@ class Service : public KeyedService,
const ProvidedFileSystemInfo& file_system_info)>
FileSystemFactoryCallback;
+ // Reason for unmounting. In case of UNMOUNT_REASON_SHUTDOWN, the file system
+ // will be remounted automatically after a reboot. In case of
+ // UNMOUNT_REASON_USER it will be permanently unmounted.
+ enum UnmountReason { UNMOUNT_REASON_USER, UNMOUNT_REASON_SHUTDOWN };
+
Service(Profile* profile, extensions::ExtensionRegistry* extension_registry);
virtual ~Service();
@@ -75,7 +80,8 @@ class Service : public KeyedService,
// Unmounts a file system with the specified |file_system_id| for the
// |extension_id|. For success returns true, otherwise false.
bool UnmountFileSystem(const std::string& extension_id,
- const std::string& file_system_id);
+ const std::string& file_system_id,
+ UnmountReason reason);
// Requests unmounting of the file system. The callback is called when the
// request is accepted or rejected, with an error code. Returns false if the
@@ -128,13 +134,14 @@ 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();
+ // Remembers the file system in preferences, in order to remount after a
+ // reboot.
+ void RememberFileSystem(const ProvidedFileSystemInfo& file_system_info);
- // 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);
+ // Removes the file system from preferences, so it is not remounmted anymore
+ // after a reboot.
+ void ForgetFileSystem(const std::string& extension_id,
+ const std::string& file_system_id);
// Restores from preferences file systems mounted previously by the
// |extension_id| providing extension.

Powered by Google App Engine
This is Rietveld 408576698