Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(371)

Side by Side Diff: chrome/browser/chromeos/login/mount_manager.h

Issue 286933002: [cros login] Split login related classes into subfolders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix includes in new tests Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MOUNT_MANAGER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MOUNT_MANAGER_H_
7
8 #include <map>
9 #include <string>
10
11 #include "base/files/file_path.h"
12 #include "base/memory/scoped_ptr.h"
13
14 class PrefRegistrySimple;
15
16 namespace chromeos {
17
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();
24
25 static base::FilePath GetHomeDir(std::string& user_hash);
26
27 virtual ~MountManager();
28
29 virtual bool IsMounted(const std::string& user_id);
30 virtual base::FilePath GetPath(const std::string& user_id);
31
32 virtual void SetPath(const std::string& user_id,
33 const base::FilePath& path);
34 virtual void DeletePath(const std::string& user_id);
35
36 private:
37 MountManager();
38
39 typedef std::map<std::string, base::FilePath> UserToPathMap;
40
41 UserToPathMap additional_mounts_;
42
43 static MountManager* instance_;
44
45 DISALLOW_COPY_AND_ASSIGN(MountManager);
46 };
47
48 } // namespace chromeos
49
50 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOUNT_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/mock_user_manager.cc ('k') | chrome/browser/chromeos/login/mount_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698