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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
256 // Adds a pre-existing Profile object to the set managed by this | 256 // Adds a pre-existing Profile object to the set managed by this |
257 // ProfileManager. This ProfileManager takes ownership of the Profile. | 257 // ProfileManager. This ProfileManager takes ownership of the Profile. |
258 // The Profile should not already be managed by this ProfileManager. | 258 // The Profile should not already be managed by this ProfileManager. |
259 // Returns true if the profile was added, false otherwise. | 259 // Returns true if the profile was added, false otherwise. |
260 bool AddProfile(Profile* profile); | 260 bool AddProfile(Profile* profile); |
261 | 261 |
262 // Registers profile with given info. Returns pointer to created ProfileInfo | 262 // Registers profile with given info. Returns pointer to created ProfileInfo |
263 // entry. | 263 // entry. |
264 ProfileInfo* RegisterProfile(Profile* profile, bool created); | 264 ProfileInfo* RegisterProfile(Profile* profile, bool created); |
265 | 265 |
266 ProfileInfo* GetProfileInfoByPath(const FilePath& path) const; | |
Nikita (slow)
2013/01/09 13:54:33
nit: comment
Denis Kuznetsov (DE-MUC)
2013/01/09 14:10:49
Done.
| |
267 | |
266 typedef std::pair<FilePath, string16> ProfilePathAndName; | 268 typedef std::pair<FilePath, string16> ProfilePathAndName; |
267 typedef std::vector<ProfilePathAndName> ProfilePathAndNames; | 269 typedef std::vector<ProfilePathAndName> ProfilePathAndNames; |
268 ProfilePathAndNames GetSortedProfilesFromDirectoryMap(); | 270 ProfilePathAndNames GetSortedProfilesFromDirectoryMap(); |
269 | 271 |
270 static bool CompareProfilePathAndName( | 272 static bool CompareProfilePathAndName( |
271 const ProfileManager::ProfilePathAndName& pair1, | 273 const ProfileManager::ProfilePathAndName& pair1, |
272 const ProfileManager::ProfilePathAndName& pair2); | 274 const ProfileManager::ProfilePathAndName& pair2); |
273 | 275 |
274 // Adds |profile| to the profile info cache if it hasn't been added yet. | 276 // Adds |profile| to the profile info cache if it hasn't been added yet. |
275 void AddProfileToCache(Profile* profile); | 277 void AddProfileToCache(Profile* profile); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
353 class ProfileManagerWithoutInit : public ProfileManager { | 355 class ProfileManagerWithoutInit : public ProfileManager { |
354 public: | 356 public: |
355 explicit ProfileManagerWithoutInit(const FilePath& user_data_dir); | 357 explicit ProfileManagerWithoutInit(const FilePath& user_data_dir); |
356 | 358 |
357 protected: | 359 protected: |
358 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {} | 360 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {} |
359 virtual void DoFinalInitLogging(Profile*) OVERRIDE {} | 361 virtual void DoFinalInitLogging(Profile*) OVERRIDE {} |
360 }; | 362 }; |
361 | 363 |
362 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ | 364 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ |
OLD | NEW |