| 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 29 matching lines...) Expand all Loading... |
| 40 virtual ~ProfileManager(); | 40 virtual ~ProfileManager(); |
| 41 | 41 |
| 42 #if defined(ENABLE_SESSION_SERVICE) | 42 #if defined(ENABLE_SESSION_SERVICE) |
| 43 // Invokes SessionServiceFactory::ShutdownForProfile() for all profiles. | 43 // Invokes SessionServiceFactory::ShutdownForProfile() for all profiles. |
| 44 static void ShutdownSessionServices(); | 44 static void ShutdownSessionServices(); |
| 45 #endif | 45 #endif |
| 46 | 46 |
| 47 // Physically remove deleted profile directories from disk. | 47 // Physically remove deleted profile directories from disk. |
| 48 static void NukeDeletedProfilesFromDisk(); | 48 static void NukeDeletedProfilesFromDisk(); |
| 49 | 49 |
| 50 // The following DEPRECATED functions should be removed: crbug.com/83792. |
| 51 |
| 50 // DEPRECATED: DO NOT USE unless in ChromeOS. | 52 // DEPRECATED: DO NOT USE unless in ChromeOS. |
| 51 // Returns the default profile. This adds the profile to the | 53 // Returns the default profile. This adds the profile to the |
| 52 // ProfileManager if it doesn't already exist. This method returns NULL if | 54 // ProfileManager if it doesn't already exist. This method returns NULL if |
| 53 // the profile doesn't exist and we can't create it. | 55 // the profile doesn't exist and we can't create it. |
| 54 // The profile used can be overridden by using --login-profile on cros. | 56 // The profile used can be overridden by using --login-profile on cros. |
| 55 Profile* GetDefaultProfile(const base::FilePath& user_data_dir); | 57 Profile* GetDefaultProfile(const base::FilePath& user_data_dir); |
| 56 | 58 |
| 59 // DEPRECATED: Temporary measure to ensure that GetDefaultProfile() is not |
| 60 // called before CreateProfile() is called in chrome_browser_main.cc. |
| 61 // Note: This needs to be called with 'false' first (early in |
| 62 // ChromeBrowserMainParts), otherwise it will assume 'true' so as not to |
| 63 // affect any tests. |
| 64 static void SetAllowGetDefaultProfile(bool allow); |
| 65 |
| 57 // DEPRECATED: DO NOT USE unless in ChromeOS. | 66 // DEPRECATED: DO NOT USE unless in ChromeOS. |
| 58 // Same as instance method but provides the default user_data_dir as well. | 67 // Same as instance method but provides the default user_data_dir as well. |
| 59 static Profile* GetDefaultProfile(); | 68 static Profile* GetDefaultProfile(); |
| 60 | 69 |
| 61 // DEPRECATED: DO NOT USE unless in ChromeOS. | 70 // DEPRECATED: DO NOT USE unless in ChromeOS. |
| 62 // Same as GetDefaultProfile() but returns OffTheRecord profile | 71 // Same as GetDefaultProfile() but returns OffTheRecord profile |
| 63 // if guest login. | 72 // if guest login. |
| 64 static Profile* GetDefaultProfileOrOffTheRecord(); | 73 static Profile* GetDefaultProfileOrOffTheRecord(); |
| 65 | 74 |
| 66 // Returns a profile for a specific profile directory within the user data | 75 // Returns a profile for a specific profile directory within the user data |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 class ProfileManagerWithoutInit : public ProfileManager { | 382 class ProfileManagerWithoutInit : public ProfileManager { |
| 374 public: | 383 public: |
| 375 explicit ProfileManagerWithoutInit(const base::FilePath& user_data_dir); | 384 explicit ProfileManagerWithoutInit(const base::FilePath& user_data_dir); |
| 376 | 385 |
| 377 protected: | 386 protected: |
| 378 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {} | 387 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {} |
| 379 virtual void DoFinalInitLogging(Profile*) OVERRIDE {} | 388 virtual void DoFinalInitLogging(Profile*) OVERRIDE {} |
| 380 }; | 389 }; |
| 381 | 390 |
| 382 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ | 391 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ |
| OLD | NEW |