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 // If GetDefaultProfile() or GetDefaultProfileOrOffTheRecord() is called |
| 62 // before this, a CHECK will be triggered. |
| 63 static void AllowGetDefaultProfile(); |
| 64 |
57 // DEPRECATED: DO NOT USE unless in ChromeOS. | 65 // DEPRECATED: DO NOT USE unless in ChromeOS. |
58 // Same as instance method but provides the default user_data_dir as well. | 66 // Same as instance method but provides the default user_data_dir as well. |
59 static Profile* GetDefaultProfile(); | 67 static Profile* GetDefaultProfile(); |
60 | 68 |
61 // DEPRECATED: DO NOT USE unless in ChromeOS. | 69 // DEPRECATED: DO NOT USE unless in ChromeOS. |
62 // Same as GetDefaultProfile() but returns OffTheRecord profile | 70 // Same as GetDefaultProfile() but returns OffTheRecord profile |
63 // if guest login. | 71 // if guest login. |
64 static Profile* GetDefaultProfileOrOffTheRecord(); | 72 static Profile* GetDefaultProfileOrOffTheRecord(); |
65 | 73 |
66 // Returns a profile for a specific profile directory within the user data | 74 // Returns a profile for a specific profile directory within the user data |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 class ProfileManagerWithoutInit : public ProfileManager { | 377 class ProfileManagerWithoutInit : public ProfileManager { |
370 public: | 378 public: |
371 explicit ProfileManagerWithoutInit(const base::FilePath& user_data_dir); | 379 explicit ProfileManagerWithoutInit(const base::FilePath& user_data_dir); |
372 | 380 |
373 protected: | 381 protected: |
374 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {} | 382 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {} |
375 virtual void DoFinalInitLogging(Profile*) OVERRIDE {} | 383 virtual void DoFinalInitLogging(Profile*) OVERRIDE {} |
376 }; | 384 }; |
377 | 385 |
378 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ | 386 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ |
OLD | NEW |