#include "base/observer_list.h"
#include "base/prefs/pref_change_registrar.h"
#include "chrome/browser/chromeos/drive/drive_integration_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"
#include "components/browser_context_keyed_service/browser_context_keyed_service.h"
bool FindVolumeInfoById(const std::string& volume_id,
VolumeInfo* result) const;
+ // For testing purpose, adds the custom |path| as the "Downloads" folder.
+ bool RegisterDownloadsDirectoryForTesting(const base::FilePath& path);
+
// drive::DriveIntegrationServiceObserver overrides.
virtual void OnFileSystemMounted() OVERRIDE;
virtual void OnFileSystemBeingUnmounted() OVERRIDE;
void OnExternalStorageDisabledChanged();
private:
+ void OnPrivetVolumesAvailable(
+ const local_discovery::PrivetVolumeLister::VolumeList& volumes);
+ void DoMountEvent(chromeos::MountError error_code,
+ const VolumeInfo& volume_info,
+ bool is_remounting);
+ void DoUnmountEvent(chromeos::MountError error_code,
+ const VolumeInfo& volume_info);
+
Profile* profile_;
drive::DriveIntegrationService* drive_integration_service_;
chromeos::disks::DiskMountManager* disk_mount_manager_;
scoped_ptr<MountedDiskMonitor> mounted_disk_monitor_;
PrefChangeRegistrar pref_change_registrar_;
ObserverList<VolumeManagerObserver> observers_;
+ scoped_ptr<local_discovery::PrivetVolumeLister> privet_volume_lister_;
+
+ std::map<std::string, VolumeInfo> mounted_volumes_;
+
DISALLOW_COPY_AND_ASSIGN(VolumeManager);
};