| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 | 9 |
| 10 #include <list> | 10 #include <list> |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 // Autoloads profiles if they are running background apps. | 209 // Autoloads profiles if they are running background apps. |
| 210 void AutoloadProfiles(); | 210 void AutoloadProfiles(); |
| 211 | 211 |
| 212 // Register and add testing profile to the ProfileManager. Use ONLY in tests. | 212 // Register and add testing profile to the ProfileManager. Use ONLY in tests. |
| 213 // This allows the creation of Profiles outside of the standard creation path | 213 // This allows the creation of Profiles outside of the standard creation path |
| 214 // for testing. If |addToCache|, add to ProfileInfoCache as well. | 214 // for testing. If |addToCache|, add to ProfileInfoCache as well. |
| 215 void RegisterTestingProfile(Profile* profile, bool addToCache); | 215 void RegisterTestingProfile(Profile* profile, bool addToCache); |
| 216 | 216 |
| 217 const base::FilePath& user_data_dir() const { return user_data_dir_; } | 217 const base::FilePath& user_data_dir() const { return user_data_dir_; } |
| 218 | 218 |
| 219 // For ChromeOS, determines if the user has logged in to a real profile. |
| 220 bool IsLoggedIn() const { return logged_in_; } |
| 221 |
| 219 protected: | 222 protected: |
| 220 // Does final initial actions. | 223 // Does final initial actions. |
| 221 virtual void DoFinalInit(Profile* profile, bool go_off_the_record); | 224 virtual void DoFinalInit(Profile* profile, bool go_off_the_record); |
| 222 virtual void DoFinalInitForServices(Profile* profile, bool go_off_the_record); | 225 virtual void DoFinalInitForServices(Profile* profile, bool go_off_the_record); |
| 223 virtual void DoFinalInitLogging(Profile* profile); | 226 virtual void DoFinalInitLogging(Profile* profile); |
| 224 | 227 |
| 225 // Creates a new profile by calling into the profile's profile creation | 228 // Creates a new profile by calling into the profile's profile creation |
| 226 // method. Virtual so that unittests can return a TestingProfile instead | 229 // method. Virtual so that unittests can return a TestingProfile instead |
| 227 // of the Profile's result. | 230 // of the Profile's result. |
| 228 virtual Profile* CreateProfileHelper(const base::FilePath& path); | 231 virtual Profile* CreateProfileHelper(const base::FilePath& path); |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 class ProfileManagerWithoutInit : public ProfileManager { | 364 class ProfileManagerWithoutInit : public ProfileManager { |
| 362 public: | 365 public: |
| 363 explicit ProfileManagerWithoutInit(const base::FilePath& user_data_dir); | 366 explicit ProfileManagerWithoutInit(const base::FilePath& user_data_dir); |
| 364 | 367 |
| 365 protected: | 368 protected: |
| 366 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {} | 369 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {} |
| 367 virtual void DoFinalInitLogging(Profile*) OVERRIDE {} | 370 virtual void DoFinalInitLogging(Profile*) OVERRIDE {} |
| 368 }; | 371 }; |
| 369 | 372 |
| 370 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ | 373 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ |
| OLD | NEW |