| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 | 10 |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 | 229 |
| 230 // The inverse function of MountTypeToString. | 230 // The inverse function of MountTypeToString. |
| 231 static MountType MountTypeFromString(const std::string& type_str); | 231 static MountType MountTypeFromString(const std::string& type_str); |
| 232 | 232 |
| 233 // Returns corresponding string to |type| like "unknown_filesystem". | 233 // Returns corresponding string to |type| like "unknown_filesystem". |
| 234 static std::string MountConditionToString(MountCondition type); | 234 static std::string MountConditionToString(MountCondition type); |
| 235 | 235 |
| 236 // Creates the global DiskMountManager instance. | 236 // Creates the global DiskMountManager instance. |
| 237 static void Initialize(); | 237 static void Initialize(); |
| 238 | 238 |
| 239 // Similar to Initialize(), but can inject an alternative |
| 240 // DiskMountManager such as MockDiskMountManager for testing. |
| 241 // The injected object will be owned by the internal pointer and deleted |
| 242 // by Shutdown(). |
| 243 static void InitializeForTesting(DiskMountManager* disk_mount_manager); |
| 244 |
| 239 // Destroys the global DiskMountManager instance if it exists. | 245 // Destroys the global DiskMountManager instance if it exists. |
| 240 static void Shutdown(); | 246 static void Shutdown(); |
| 241 | 247 |
| 242 // Returns a pointer to the global DiskMountManager instance. | 248 // Returns a pointer to the global DiskMountManager instance. |
| 243 // Initialize() should already have been called. | 249 // Initialize() should already have been called. |
| 244 static DiskMountManager* GetInstance(); | 250 static DiskMountManager* GetInstance(); |
| 245 }; | 251 }; |
| 246 | 252 |
| 247 } // namespace disks | 253 } // namespace disks |
| 248 } // namespace chromeos | 254 } // namespace chromeos |
| 249 | 255 |
| 250 #endif // CHROME_BROWSER_CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ | 256 #endif // CHROME_BROWSER_CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ |
| OLD | NEW |