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 #pragma once | 9 #pragma once |
10 | 10 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 // Returns the default profile. This adds the profile to the | 52 // Returns the default profile. This adds the profile to the |
53 // ProfileManager if it doesn't already exist. This method returns NULL if | 53 // ProfileManager if it doesn't already exist. This method returns NULL if |
54 // the profile doesn't exist and we can't create it. | 54 // the profile doesn't exist and we can't create it. |
55 // The profile used can be overridden by using --login-profile on cros. | 55 // The profile used can be overridden by using --login-profile on cros. |
56 Profile* GetDefaultProfile(const FilePath& user_data_dir); | 56 Profile* GetDefaultProfile(const FilePath& user_data_dir); |
57 | 57 |
58 // DEPRECATED: DO NOT USE unless in ChromeOS. | 58 // DEPRECATED: DO NOT USE unless in ChromeOS. |
59 // Same as instance method but provides the default user_data_dir as well. | 59 // Same as instance method but provides the default user_data_dir as well. |
60 static Profile* GetDefaultProfile(); | 60 static Profile* GetDefaultProfile(); |
61 | 61 |
| 62 // DEPRECATED: DO NOT USE unless in ChromeOS. |
| 63 // Same as GetDefaultProfile() but returns OffTheRecord profile |
| 64 // if guest login. |
| 65 static Profile* GetDefaultProfileOrOffTheRecord(); |
| 66 |
62 // Returns a profile for a specific profile directory within the user data | 67 // Returns a profile for a specific profile directory within the user data |
63 // dir. This will return an existing profile it had already been created, | 68 // dir. This will return an existing profile it had already been created, |
64 // otherwise it will create and manage it. | 69 // otherwise it will create and manage it. |
65 Profile* GetProfile(const FilePath& profile_dir); | 70 Profile* GetProfile(const FilePath& profile_dir); |
66 | 71 |
67 // Returns total number of profiles available on this machine. | 72 // Returns total number of profiles available on this machine. |
68 size_t GetNumberOfProfiles(); | 73 size_t GetNumberOfProfiles(); |
69 | 74 |
70 // Explicit asynchronous creation of a profile located at |profile_path|. | 75 // Explicit asynchronous creation of a profile located at |profile_path|. |
71 // If the profile has already been created then callback is called | 76 // If the profile has already been created then callback is called |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 class ProfileManagerWithoutInit : public ProfileManager { | 329 class ProfileManagerWithoutInit : public ProfileManager { |
325 public: | 330 public: |
326 explicit ProfileManagerWithoutInit(const FilePath& user_data_dir); | 331 explicit ProfileManagerWithoutInit(const FilePath& user_data_dir); |
327 | 332 |
328 protected: | 333 protected: |
329 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {} | 334 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {} |
330 virtual void DoFinalInitLogging(Profile*) OVERRIDE {} | 335 virtual void DoFinalInitLogging(Profile*) OVERRIDE {} |
331 }; | 336 }; |
332 | 337 |
333 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ | 338 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ |
OLD | NEW |