1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_MOUNT_MANAGER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_MOUNT_MANAGER_H_
11 #include "base/files/file_path.h"
12 #include "base/memory/scoped_ptr.h"
14 class PrefRegistrySimple
;
18 // Keeps track of mount points for different users.
21 // Returns a shared instance of a MountManager. Not thread-safe,
22 // should only be called from the main UI thread.
23 static MountManager
* Get();
25 static base::FilePath
GetHomeDir(std::string
& user_hash
);
27 virtual ~MountManager();
29 virtual bool IsMounted(const std::string
& user_id
);
30 virtual base::FilePath
GetPath(const std::string
& user_id
);
32 virtual void SetPath(const std::string
& user_id
,
33 const base::FilePath
& path
);
34 virtual void DeletePath(const std::string
& user_id
);
39 typedef std::map
<std::string
, base::FilePath
> UserToPathMap
;
41 UserToPathMap additional_mounts_
;
43 static MountManager
* instance_
;
45 DISALLOW_COPY_AND_ASSIGN(MountManager
);
48 } // namespace chromeos
50 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_MOUNT_MANAGER_H_