diff options
author | satorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-17 03:59:35 +0000 |
---|---|---|
committer | satorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-17 03:59:35 +0000 |
commit | 17d0ba461daac2c49a3b3ebc299f94dc87c91393 (patch) | |
tree | 79b5073ecff56192b881b688e1114102c194bbcd /chrome/browser/chromeos/extensions/file_manager/drive_test_util.cc | |
parent | adbe1348fc14fc502ca0dc7de3002d37398a07b9 (diff) | |
download | chromium_src-17d0ba461daac2c49a3b3ebc299f94dc87c91393.zip chromium_src-17d0ba461daac2c49a3b3ebc299f94dc87c91393.tar.gz chromium_src-17d0ba461daac2c49a3b3ebc299f94dc87c91393.tar.bz2 |
drive: Introduce DriveSystemServiceObserver
Move DriveFileSystem::NotifyFileSystemMounted() and
NotifyFileSystemToBeUnmounted() to DriveSystemServiceObserver
in favor of less things to have in DriveFileSystem
BUG=231788
TEST=none
Review URL: https://codereview.chromium.org/13866050
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194529 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/extensions/file_manager/drive_test_util.cc')
-rw-r--r-- | chrome/browser/chromeos/extensions/file_manager/drive_test_util.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/chrome/browser/chromeos/extensions/file_manager/drive_test_util.cc b/chrome/browser/chromeos/extensions/file_manager/drive_test_util.cc index a7a1fc2..265961b 100644 --- a/chrome/browser/chromeos/extensions/file_manager/drive_test_util.cc +++ b/chrome/browser/chromeos/extensions/file_manager/drive_test_util.cc @@ -20,31 +20,31 @@ const char kDriveMountPointName[] = "drive"; // Helper class used to wait for |OnFileSystemMounted| event from a drive file // system. -class DriveMountPointWaiter : public drive::DriveFileSystemObserver { +class DriveMountPointWaiter : public drive::DriveSystemServiceObserver { public: - explicit DriveMountPointWaiter(drive::DriveFileSystemInterface* file_system) - : file_system_(file_system) { - file_system_->AddObserver(this); + explicit DriveMountPointWaiter(drive::DriveSystemService* system_service) + : system_service_(system_service) { + system_service_->AddObserver(this); } virtual ~DriveMountPointWaiter() { - file_system_->RemoveObserver(this); + system_service_->RemoveObserver(this); } - // DriveFileSystemObserver override. + // DriveSystemServiceObserver override. virtual void OnFileSystemMounted() OVERRIDE { // Note that it is OK for |run_loop_.Quit| to be called before // |run_loop_.Run|. In this case |Run| will return immediately. run_loop_.Quit(); } - // Runs loop until the file_system_ gets mounted. + // Runs loop until the file system is mounted. void Wait() { run_loop_.Run(); } private: - drive::DriveFileSystemInterface* file_system_; + drive::DriveSystemService* system_service_; base::RunLoop run_loop_; }; @@ -63,9 +63,9 @@ void WaitUntilDriveMountPointIsAdded(Profile* profile) { drive::DriveSystemService* system_service = drive::DriveSystemServiceFactory::FindForProfileRegardlessOfStates( profile); - DCHECK(system_service && system_service->file_system()); + DCHECK(system_service); - DriveMountPointWaiter mount_point_waiter(system_service->file_system()); + DriveMountPointWaiter mount_point_waiter(system_service); base::FilePath ignored; // GetRegisteredPath succeeds iff the mount point exists. |