| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_PROFILE_MANAGER_H__ | 7 #ifndef CHROME_BROWSER_PROFILE_MANAGER_H__ |
| 8 #define CHROME_BROWSER_PROFILE_MANAGER_H__ | 8 #define CHROME_BROWSER_PROFILE_MANAGER_H__ |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 class ProfileManager : public NonThreadSafe, | 67 class ProfileManager : public NonThreadSafe, |
| 68 public SystemMonitor::PowerObserver, | 68 public SystemMonitor::PowerObserver, |
| 69 public NotificationObserver { | 69 public NotificationObserver { |
| 70 public: | 70 public: |
| 71 ProfileManager(); | 71 ProfileManager(); |
| 72 virtual ~ProfileManager(); | 72 virtual ~ProfileManager(); |
| 73 | 73 |
| 74 // Invokes ShutdownSessionService() on all profiles. | 74 // Invokes ShutdownSessionService() on all profiles. |
| 75 static void ShutdownSessionServices(); | 75 static void ShutdownSessionServices(); |
| 76 | 76 |
| 77 // Returns profile to use for Chrome in login wizard mode. | |
| 78 static Profile* GetLoginWizardProfile(); | |
| 79 | |
| 80 // Returns the default profile. This adds the profile to the | 77 // Returns the default profile. This adds the profile to the |
| 81 // ProfileManager if it doesn't already exist. This method returns NULL if | 78 // ProfileManager if it doesn't already exist. This method returns NULL if |
| 82 // the profile doesn't exist and we can't create it. | 79 // the profile doesn't exist and we can't create it. |
| 83 // The profile used can be overridden by using --profile on | 80 // The profile used can be overridden by using --login-profile on cros. |
| 84 Profile* GetDefaultProfile(const FilePath& user_data_dir); | 81 Profile* GetDefaultProfile(const FilePath& user_data_dir); |
| 85 | 82 |
| 83 // Same as instance method but provides the default user_data_dir as well. |
| 84 static Profile* GetDefaultProfile(); |
| 85 |
| 86 // Returns a profile for a specific profile directory within the user data | 86 // Returns a profile for a specific profile directory within the user data |
| 87 // dir. This will return an existing profile it had already been created, | 87 // dir. This will return an existing profile it had already been created, |
| 88 // otherwise it will create and manage it. | 88 // otherwise it will create and manage it. |
| 89 Profile* GetProfile(const FilePath& profile_dir); | 89 Profile* GetProfile(const FilePath& profile_dir); |
| 90 | 90 |
| 91 // These allow iteration through the current list of profiles. | 91 // These allow iteration through the current list of profiles. |
| 92 typedef std::vector<Profile*> ProfileVector; | 92 typedef std::vector<Profile*> ProfileVector; |
| 93 typedef ProfileVector::iterator iterator; | 93 typedef ProfileVector::iterator iterator; |
| 94 typedef ProfileVector::const_iterator const_iterator; | 94 typedef ProfileVector::const_iterator const_iterator; |
| 95 | 95 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 | 157 |
| 158 // Indicates that a user has logged in and that the profile specified | 158 // Indicates that a user has logged in and that the profile specified |
| 159 // in the --login-profile command line argument should be used as the | 159 // in the --login-profile command line argument should be used as the |
| 160 // default. | 160 // default. |
| 161 bool logged_in_; | 161 bool logged_in_; |
| 162 | 162 |
| 163 DISALLOW_EVIL_CONSTRUCTORS(ProfileManager); | 163 DISALLOW_EVIL_CONSTRUCTORS(ProfileManager); |
| 164 }; | 164 }; |
| 165 | 165 |
| 166 #endif // CHROME_BROWSER_PROFILE_MANAGER_H__ | 166 #endif // CHROME_BROWSER_PROFILE_MANAGER_H__ |
| OLD | NEW |