| 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 e1949b6977c5e8bade98f1b3c0c10d3ee98198bc..3ed9a73027e26cd0a312b42c591389734ca489b5 100644
|
| --- a/chrome/browser/chromeos/file_system_provider/service.h
|
| +++ b/chrome/browser/chromeos/file_system_provider/service.h
|
| @@ -20,6 +20,12 @@
|
| #include "chrome/common/extensions/api/file_system_provider.h"
|
| #include "components/keyed_service/core/keyed_service.h"
|
| #include "content/public/browser/browser_context.h"
|
| +#include "extensions/browser/extension_registry_observer.h"
|
| +
|
| +namespace extensions {
|
| +class Extension;
|
| +class ExtensionRegistry;
|
| +} // namespace extensions
|
|
|
| namespace chromeos {
|
| namespace file_system_provider {
|
| @@ -29,9 +35,11 @@ class ProvidedFileSystemInterface;
|
| class ServiceFactory;
|
|
|
| // Manages and registers the fileSystemProvider service.
|
| -class Service : public KeyedService {
|
| +class Service : public KeyedService,
|
| + public extensions::ExtensionRegistryObserver {
|
| public:
|
| - explicit Service(Profile* profile);
|
| + explicit Service(Profile* profile,
|
| + extensions::ExtensionRegistry* extension_registry);
|
| virtual ~Service();
|
|
|
| // Mounts a file system provided by an extension with the |extension_id|.
|
| @@ -69,6 +77,10 @@ class Service : public KeyedService {
|
| // BrowserContextKeyedService overrides.
|
| virtual void Shutdown() OVERRIDE;
|
|
|
| + // extensions::ExtensionRegistryObserver overrides.
|
| + virtual void OnExtensionUnloaded(const extensions::Extension* extension)
|
| + OVERRIDE;
|
| +
|
| // Getter for the request manager. Used by the extension API to forward
|
| // replies. Valid as long as the service.
|
| RequestManager* request_manager() { return &request_manager_; }
|
| @@ -81,8 +93,12 @@ class Service : public KeyedService {
|
| void OnRequestUnmountStatus(const ProvidedFileSystemInfo& file_system_info,
|
| base::File::Error error);
|
|
|
| - RequestManager request_manager_;
|
| Profile* profile_;
|
| +
|
| + // Owned by extensions::ExtensionRegistryFactory.
|
| + extensions::ExtensionRegistry* extension_registry_;
|
| +
|
| + RequestManager request_manager_;
|
| ObserverList<Observer> observers_;
|
| ProvidedFileSystemMap file_system_map_; // Owns pointers.
|
|
|
|
|