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

Unified Diff: chrome/browser/chromeos/file_manager/volume_manager.h

Issue 192573002: [fsp] Introduce file_system_provider::Service class for the FileSystemProvider API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Simplified. Created 6 years, 9 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_manager/volume_manager.h
diff --git a/chrome/browser/chromeos/file_manager/volume_manager.h b/chrome/browser/chromeos/file_manager/volume_manager.h
index 7311fccc0d805cdf9e49221260fb4ccfae58281d..3471652ef45bea106ed28e103fa6eeb686f52ebf 100644
--- a/chrome/browser/chromeos/file_manager/volume_manager.h
+++ b/chrome/browser/chromeos/file_manager/volume_manager.h
@@ -14,6 +14,8 @@
#include "base/observer_list.h"
#include "base/prefs/pref_change_registrar.h"
#include "chrome/browser/chromeos/drive/drive_integration_service.h"
+#include "chrome/browser/chromeos/file_system_provider/observer.h"
+#include "chrome/browser/chromeos/file_system_provider/service.h"
#include "chrome/browser/local_discovery/storage/privet_volume_lister.h"
#include "chromeos/dbus/cros_disks_client.h"
#include "chromeos/disks/disk_mount_manager.h"
@@ -46,6 +48,7 @@ enum VolumeType {
VOLUME_TYPE_REMOVABLE_DISK_PARTITION,
VOLUME_TYPE_MOUNTED_ARCHIVE_FILE,
VOLUME_TYPE_CLOUD_DEVICE,
+ VOLUME_TYPE_PROVIDED, // File system provided by the FileSystemProvider API.
VOLUME_TYPE_TESTING
};
@@ -100,12 +103,15 @@ struct VolumeInfo {
// - Mounted zip archives.
class VolumeManager : public KeyedService,
public drive::DriveIntegrationServiceObserver,
- public chromeos::disks::DiskMountManager::Observer {
+ public chromeos::disks::DiskMountManager::Observer,
+ public chromeos::file_system_provider::Observer {
public:
- VolumeManager(Profile* profile,
- drive::DriveIntegrationService* drive_integration_service,
- chromeos::PowerManagerClient* power_manager_client,
- chromeos::disks::DiskMountManager* disk_mount_manager);
+ VolumeManager(
+ Profile* profile,
+ drive::DriveIntegrationService* drive_integration_service,
+ chromeos::PowerManagerClient* power_manager_client,
+ chromeos::disks::DiskMountManager* disk_mount_manager,
+ chromeos::file_system_provider::Service* file_system_provider_service);
virtual ~VolumeManager();
// Returns the instance corresponding to the |context|.
@@ -162,6 +168,14 @@ class VolumeManager : public KeyedService,
chromeos::FormatError error_code,
const std::string& device_path) OVERRIDE;
+ // chromeos::file_system_provider::Observer overrides.
+ virtual void OnProvidedFileSystemRegistered(
+ const chromeos::file_system_provider::ProvidedFileSystem& file_system)
+ OVERRIDE;
+ virtual void OnProvidedFileSystemUnregistered(
+ const chromeos::file_system_provider::ProvidedFileSystem& file_system)
+ OVERRIDE;
+
// Called on change to kExternalStorageDisabled pref.
void OnExternalStorageDisabledChanged();
@@ -175,13 +189,14 @@ class VolumeManager : public KeyedService,
const VolumeInfo& volume_info);
Profile* profile_;
- drive::DriveIntegrationService* drive_integration_service_;
- chromeos::disks::DiskMountManager* disk_mount_manager_;
+ drive::DriveIntegrationService* drive_integration_service_; // Not owned.
+ chromeos::disks::DiskMountManager* disk_mount_manager_; // Not owned.
scoped_ptr<MountedDiskMonitor> mounted_disk_monitor_;
PrefChangeRegistrar pref_change_registrar_;
ObserverList<VolumeManagerObserver> observers_;
scoped_ptr<local_discovery::PrivetVolumeLister> privet_volume_lister_;
-
+ chromeos::file_system_provider::Service*
+ file_system_provider_service_; // Not owned by this class.
std::map<std::string, VolumeInfo> mounted_volumes_;
DISALLOW_COPY_AND_ASSIGN(VolumeManager);

Powered by Google App Engine
This is Rietveld 408576698