| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
| 7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #include "chrome/browser/chromeos/drive/drive_integration_service.h" | 8 #include "chrome/browser/chromeos/drive/drive_integration_service.h" |
| 9 #include "chrome/browser/chromeos/drive/file_system.h" | 9 #include "chrome/browser/chromeos/drive/file_system.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| 11 #include "content/public/browser/browser_context.h" | 11 #include "content/public/browser/browser_context.h" |
| 12 #include "webkit/fileapi/external_mount_points.h" | 12 #include "webkit/browser/fileapi/external_mount_points.h" |
| 13 | 13 |
| 14 namespace drive_test_util { | 14 namespace drive_test_util { |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 const char kDriveMountPointName[] = "drive"; | 18 const char kDriveMountPointName[] = "drive"; |
| 19 | 19 |
| 20 // Helper class used to wait for |OnFileSystemMounted| event from a drive file | 20 // Helper class used to wait for |OnFileSystemMounted| event from a drive file |
| 21 // system. | 21 // system. |
| 22 class DriveMountPointWaiter : public drive::DriveIntegrationServiceObserver { | 22 class DriveMountPointWaiter : public drive::DriveIntegrationServiceObserver { |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 // GetRegisteredPath succeeds iff the mount point exists. | 71 // GetRegisteredPath succeeds iff the mount point exists. |
| 72 if (!content::BrowserContext::GetMountPoints(profile)-> | 72 if (!content::BrowserContext::GetMountPoints(profile)-> |
| 73 GetRegisteredPath(kDriveMountPointName, &ignored)) { | 73 GetRegisteredPath(kDriveMountPointName, &ignored)) { |
| 74 LOG(WARNING) << "Waiting for drive mount point to get mounted."; | 74 LOG(WARNING) << "Waiting for drive mount point to get mounted."; |
| 75 mount_point_waiter.Wait(); | 75 mount_point_waiter.Wait(); |
| 76 LOG(WARNING) << "Drive mount point found."; | 76 LOG(WARNING) << "Drive mount point found."; |
| 77 } | 77 } |
| 78 } | 78 } |
| 79 | 79 |
| 80 } // namespace drive_test_util | 80 } // namespace drive_test_util |
| OLD | NEW |