OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_REGISTRY_INTERFACE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_REGISTRY_INTERFACE_H_ |
| 7 |
| 8 #include <string> |
| 9 #include <vector> |
| 10 |
| 11 #include "base/files/file_path.h" |
| 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "chrome/browser/chromeos/file_system_provider/observed_entry.h" |
| 14 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_info
.h" |
| 15 |
| 16 namespace chromeos { |
| 17 namespace file_system_provider { |
| 18 |
| 19 // Remembers and restores file systems in a persistent storage. |
| 20 class RegistryInterface { |
| 21 public: |
| 22 struct RestoredFileSystem; |
| 23 |
| 24 // List of file systems together with their observed entries to be remounted. |
| 25 typedef std::vector<RestoredFileSystem> RestoredFileSystems; |
| 26 |
| 27 // Information about a file system to be restored. |
| 28 struct RestoredFileSystem { |
| 29 RestoredFileSystem(); |
| 30 ~RestoredFileSystem(); |
| 31 |
| 32 std::string extension_id; |
| 33 MountOptions options; |
| 34 ObservedEntries observed_entries; |
| 35 }; |
| 36 |
| 37 virtual ~RegistryInterface(); |
| 38 |
| 39 // Remembers the file system in preferences, in order to remount after a |
| 40 // reboot. |
| 41 virtual void RememberFileSystem( |
| 42 const ProvidedFileSystemInfo& file_system_info, |
| 43 const ObservedEntries& observed_entries) = 0; |
| 44 |
| 45 // Removes the file system from preferences, so it is not remounmted anymore |
| 46 // after a reboot. |
| 47 virtual void ForgetFileSystem(const std::string& extension_id, |
| 48 const std::string& file_system_id) = 0; |
| 49 |
| 50 // Restores from preferences file systems mounted previously by the |
| 51 // |extension_id| providing extension. The returned list should be used to |
| 52 // remount them. |
| 53 virtual scoped_ptr<RestoredFileSystems> RestoreFileSystems( |
| 54 const std::string& extension_id) = 0; |
| 55 |
| 56 // Updates a tag for the specified observed entry. |
| 57 virtual void UpdateObservedEntryTag( |
| 58 const ProvidedFileSystemInfo& file_system_info, |
| 59 const ObservedEntry& observed_entry) = 0; |
| 60 }; |
| 61 |
| 62 } // namespace file_system_provider |
| 63 } // namespace chromeos |
| 64 |
| 65 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_REGISTRY_INTERFACE_H_ |
OLD | NEW |