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

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

Issue 23477070: Move OnFileSystemMounted/BeingUnmounted to VolumeManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 32d8982e8ebcd87b4676d1e229a7d3bd30cf9708..d0eeda59b95171132291f0e236ecf0a144f79bc0 100644
--- a/chrome/browser/chromeos/file_manager/volume_manager.h
+++ b/chrome/browser/chromeos/file_manager/volume_manager.h
@@ -9,6 +9,7 @@
#include "base/files/file_path.h"
#include "base/observer_list.h"
#include "base/prefs/pref_change_registrar.h"
+#include "chrome/browser/chromeos/drive/drive_integration_service.h"
#include "chromeos/disks/disk_mount_manager.h"
#include "components/browser_context_keyed_service/browser_context_keyed_service.h"
@@ -22,6 +23,10 @@ namespace content {
class BrowserContext;
} // namespace content
+namespace drive {
+class DriveIntegrationService;
+} // namespace drive
+
namespace file_manager {
class MountedDiskMonitor;
@@ -70,12 +75,6 @@ struct VolumeInfo {
bool is_parent;
};
-// Returns the VolumeInfo for Drive file system.
-// This is temporarily exposed for EventRouter's FileSystem mounting event
-// handling.
-// TODO(hidehiko): Hide this when the observing code is moved to VolumeManager.
-VolumeInfo CreateDriveVolumeInfo();
-
// Manages "Volume"s for file manager. Here are "Volume"s.
// - Drive File System (not yet supported).
// - Downloads directory.
@@ -83,9 +82,11 @@ VolumeInfo CreateDriveVolumeInfo();
// for a device).
// - Mounted zip archives.
class VolumeManager : public BrowserContextKeyedService,
+ public drive::DriveIntegrationServiceObserver,
public chromeos::disks::DiskMountManager::Observer {
public:
VolumeManager(Profile* profile,
+ drive::DriveIntegrationService* drive_integration_service,
chromeos::PowerManagerClient* power_manager_client,
chromeos::disks::DiskMountManager* disk_mount_manager);
virtual ~VolumeManager();
@@ -106,9 +107,12 @@ class VolumeManager : public BrowserContextKeyedService,
void RemoveObserver(VolumeManagerObserver* observer);
// Returns the information about all volumes currently mounted.
- // TODO(hidehiko): make this just an accessor.
std::vector<VolumeInfo> GetVolumeInfoList() const;
+ // drive::DriveIntegrationServiceObserver overrides.
+ virtual void OnFileSystemMounted() OVERRIDE;
+ virtual void OnFileSystemBeingUnmounted() OVERRIDE;
+
// chromeos::disks::DiskMountManager::Observer overrides.
virtual void OnDiskEvent(
chromeos::disks::DiskMountManager::DiskEvent event,
@@ -131,6 +135,7 @@ class VolumeManager : public BrowserContextKeyedService,
private:
Profile* profile_;
+ drive::DriveIntegrationService* drive_integration_service_;
chromeos::disks::DiskMountManager* disk_mount_manager_;
scoped_ptr<MountedDiskMonitor> mounted_disk_monitor_;
PrefChangeRegistrar pref_change_registrar_;

Powered by Google App Engine
This is Rietveld 408576698