OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 typedef std::vector<ProfilePathAndName> ProfilePathAndNames; | 249 typedef std::vector<ProfilePathAndName> ProfilePathAndNames; |
250 ProfilePathAndNames GetSortedProfilesFromDirectoryMap(); | 250 ProfilePathAndNames GetSortedProfilesFromDirectoryMap(); |
251 | 251 |
252 static bool CompareProfilePathAndName( | 252 static bool CompareProfilePathAndName( |
253 const ProfileManager::ProfilePathAndName& pair1, | 253 const ProfileManager::ProfilePathAndName& pair1, |
254 const ProfileManager::ProfilePathAndName& pair2); | 254 const ProfileManager::ProfilePathAndName& pair2); |
255 | 255 |
256 // Adds |profile| to the profile info cache if it hasn't been added yet. | 256 // Adds |profile| to the profile info cache if it hasn't been added yet. |
257 void AddProfileToCache(Profile* profile); | 257 void AddProfileToCache(Profile* profile); |
258 | 258 |
| 259 // Initializes user prefs of |profile|. This includes profile name and |
| 260 // avatar values |
| 261 void InitProfileUserPrefs(Profile* profile); |
| 262 |
259 // For ChromeOS, determines if profile should be otr. | 263 // For ChromeOS, determines if profile should be otr. |
260 bool ShouldGoOffTheRecord(); | 264 bool ShouldGoOffTheRecord(); |
261 | 265 |
262 // Get the path of the next profile directory and increment the internal | 266 // Get the path of the next profile directory and increment the internal |
263 // count. | 267 // count. |
264 // Lack of side effects: | 268 // Lack of side effects: |
265 // This function doesn't actually create the directory or touch the file | 269 // This function doesn't actually create the directory or touch the file |
266 // system. | 270 // system. |
267 FilePath GenerateNextProfileDirectoryPath(); | 271 FilePath GenerateNextProfileDirectoryPath(); |
268 | 272 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 | 305 |
302 // Same as the ProfileManager, but doesn't initialize some services of the | 306 // Same as the ProfileManager, but doesn't initialize some services of the |
303 // profile. This one is useful in unittests. | 307 // profile. This one is useful in unittests. |
304 class ProfileManagerWithoutInit : public ProfileManager { | 308 class ProfileManagerWithoutInit : public ProfileManager { |
305 public: | 309 public: |
306 explicit ProfileManagerWithoutInit(const FilePath& user_data_dir); | 310 explicit ProfileManagerWithoutInit(const FilePath& user_data_dir); |
307 | 311 |
308 protected: | 312 protected: |
309 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {} | 313 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {} |
310 virtual void DoFinalInitLogging(Profile*) OVERRIDE {} | 314 virtual void DoFinalInitLogging(Profile*) OVERRIDE {} |
| 315 virtual void DoFinalInit(Profile*, bool) OVERRIDE {} |
311 }; | 316 }; |
312 | 317 |
313 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ | 318 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ |
OLD | NEW |