OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // This class keeps track of the currently-active profiles in the runtime. | 5 // This class keeps track of the currently-active profiles in the runtime. |
6 | 6 |
7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ | 7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ |
8 #define CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ | 8 #define CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ |
9 #pragma once | 9 #pragma once |
10 | 10 |
(...skipping 26 matching lines...) Expand all Loading... |
37 Profile* GetDefaultProfile(const FilePath& user_data_dir); | 37 Profile* GetDefaultProfile(const FilePath& user_data_dir); |
38 | 38 |
39 // Same as instance method but provides the default user_data_dir as well. | 39 // Same as instance method but provides the default user_data_dir as well. |
40 static Profile* GetDefaultProfile(); | 40 static Profile* GetDefaultProfile(); |
41 | 41 |
42 // Returns a profile for a specific profile directory within the user data | 42 // Returns a profile for a specific profile directory within the user data |
43 // dir. This will return an existing profile it had already been created, | 43 // dir. This will return an existing profile it had already been created, |
44 // otherwise it will create and manage it. | 44 // otherwise it will create and manage it. |
45 Profile* GetProfile(const FilePath& profile_dir); | 45 Profile* GetProfile(const FilePath& profile_dir); |
46 | 46 |
| 47 // Returns the profile with the given |profile_id| or NULL if no such profile |
| 48 // exists. |
| 49 Profile* GetProfileWithId(ProfileId profile_id); |
| 50 |
47 // Returns true if the profile pointer is known to point to an existing | 51 // Returns true if the profile pointer is known to point to an existing |
48 // profile. | 52 // profile. |
49 bool IsValidProfile(Profile* profile); | 53 bool IsValidProfile(Profile* profile); |
50 | 54 |
51 // Returns a profile for a specific profile directory within the user data | 55 // Returns a profile for a specific profile directory within the user data |
52 // dir with the option of controlling whether extensions are initialized | 56 // dir with the option of controlling whether extensions are initialized |
53 // or not. This will return an existing profile it had already been created, | 57 // or not. This will return an existing profile it had already been created, |
54 // otherwise it will create and manage it. | 58 // otherwise it will create and manage it. |
55 // Note that if the profile has already been created, extensions may have | 59 // Note that if the profile has already been created, extensions may have |
56 // been initialized. If this matters to you, you should call GetProfileByPath | 60 // been initialized. If this matters to you, you should call GetProfileByPath |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 | 132 |
129 // Indicates that a user has logged in and that the profile specified | 133 // Indicates that a user has logged in and that the profile specified |
130 // in the --login-profile command line argument should be used as the | 134 // in the --login-profile command line argument should be used as the |
131 // default. | 135 // default. |
132 bool logged_in_; | 136 bool logged_in_; |
133 | 137 |
134 DISALLOW_COPY_AND_ASSIGN(ProfileManager); | 138 DISALLOW_COPY_AND_ASSIGN(ProfileManager); |
135 }; | 139 }; |
136 | 140 |
137 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ | 141 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ |
OLD | NEW |