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

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: Rebased. 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..bbbdfa7356f93ae22b068cc2e775272d452fc74b 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,
satorux1 2014/03/26 07:55:37 could you add a comment about the new enum? this o
mtomasz 2014/03/26 09:21:43 Done.
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();
@@ -181,6 +195,7 @@ class VolumeManager : public KeyedService,
PrefChangeRegistrar pref_change_registrar_;
ObserverList<VolumeManagerObserver> observers_;
scoped_ptr<local_discovery::PrivetVolumeLister> privet_volume_lister_;
+ chromeos::file_system_provider::Service* file_system_provider_service_;
satorux1 2014/03/26 07:55:37 Please add a comment about who owns this object.
mtomasz 2014/03/26 09:21:43 It is owned very deeply by BrowserContextKeyedServ
satorux1 2014/03/27 04:38:55 Thanks. I was interested in whether or not if this
mtomasz 2014/03/27 04:43:33 Done.
std::map<std::string, VolumeInfo> mounted_volumes_;

Powered by Google App Engine
This is Rietveld 408576698