Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / chromeos / login / auth / mount_manager.h
blob904d5b15af33d4577488a359def4b86f402ec8d9
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_
8 #include <map>
9 #include <string>
11 #include "base/files/file_path.h"
12 #include "base/memory/scoped_ptr.h"
14 class PrefRegistrySimple;
16 namespace chromeos {
18 // Keeps track of mount points for different users.
19 class MountManager {
20 public:
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);
36 private:
37 MountManager();
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_