OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 COMPONENTS_PROFILE_SERVICE_USER_ID_MAP_H_ | 5 #ifndef SERVICES_USER_USER_ID_MAP_H_ |
6 #define COMPONENTS_PROFILE_SERVICE_USER_ID_MAP_H_ | 6 #define SERVICES_USER_USER_ID_MAP_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 | 10 |
11 namespace profile { | 11 namespace user_service { |
12 | 12 |
13 // Currently, ProfileApp is run from within the chrome process. This means that | 13 // Currently, UserApp is run from within the chrome process. This means that |
14 // the ApplicationLoader is registered during MojoShellContext startup, even | 14 // the ApplicationLoader is registered during MojoShellContext startup, even |
15 // though the application itself is not started. As soon as a BrowserContext is | 15 // though the application itself is not started. As soon as a BrowserContext is |
16 // created, the BrowserContext will choose a |user_id| for itself and call us | 16 // created, the BrowserContext will choose a |user_id| for itself and call us |
17 // to register the mapping from |user_id| to |profile_data_dir|. | 17 // to register the mapping from |user_id| to |user_dir|. |
18 // | 18 // |
19 // This data is then accessed when we get our Initialize() call. | 19 // This data is then accessed when we get our Initialize() call. |
20 // | 20 // |
21 // TODO(erg): This is a temporary hack until we redo how we initialize mojo | 21 // TODO(erg): This is a temporary hack until we redo how we initialize mojo |
22 // applications inside of chrome in general; this system won't work once | 22 // applications inside of chrome in general; this system won't work once |
23 // ProfileApp gets put in its own sandboxed process. | 23 // UserApp gets put in its own sandboxed process. |
24 void AssociateMojoUserIDWithProfileDir(const std::string& user_id, | 24 void AssociateMojoUserIDWithUserDir(const std::string& user_id, |
25 const base::FilePath& profile_data_dir); | 25 const base::FilePath& user_dir); |
26 | 26 |
27 base::FilePath GetProfileDirForUserID(const std::string& user_id); | 27 base::FilePath GetUserDirForUserID(const std::string& user_id); |
28 | 28 |
29 } // namespace profile | 29 } // namespace user_service |
30 | 30 |
31 #endif // COMPONENTS_PROFILE_SERVICE_USER_ID_MAP_H_ | 31 #endif // SERVICES_USER_USER_ID_MAP_H_ |
OLD | NEW |