Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Side by Side Diff: chrome/browser/profiles/profile_manager.h

Issue 11667024: Do not return profile unless it is loaded (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Also fix ToDo Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 // Returns ProfileInfo associated with given |path|, registred earlier with
267 // RegisterProfile.
268 ProfileInfo* GetProfileInfoByPath(const FilePath& path) const;
269
266 typedef std::pair<FilePath, string16> ProfilePathAndName; 270 typedef std::pair<FilePath, string16> ProfilePathAndName;
267 typedef std::vector<ProfilePathAndName> ProfilePathAndNames; 271 typedef std::vector<ProfilePathAndName> ProfilePathAndNames;
268 ProfilePathAndNames GetSortedProfilesFromDirectoryMap(); 272 ProfilePathAndNames GetSortedProfilesFromDirectoryMap();
269 273
270 static bool CompareProfilePathAndName( 274 static bool CompareProfilePathAndName(
271 const ProfileManager::ProfilePathAndName& pair1, 275 const ProfileManager::ProfilePathAndName& pair1,
272 const ProfileManager::ProfilePathAndName& pair2); 276 const ProfileManager::ProfilePathAndName& pair2);
273 277
274 // Adds |profile| to the profile info cache if it hasn't been added yet. 278 // Adds |profile| to the profile info cache if it hasn't been added yet.
275 void AddProfileToCache(Profile* profile); 279 void AddProfileToCache(Profile* profile);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 class ProfileManagerWithoutInit : public ProfileManager { 357 class ProfileManagerWithoutInit : public ProfileManager {
354 public: 358 public:
355 explicit ProfileManagerWithoutInit(const FilePath& user_data_dir); 359 explicit ProfileManagerWithoutInit(const FilePath& user_data_dir);
356 360
357 protected: 361 protected:
358 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {} 362 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {}
359 virtual void DoFinalInitLogging(Profile*) OVERRIDE {} 363 virtual void DoFinalInitLogging(Profile*) OVERRIDE {}
360 }; 364 };
361 365
362 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ 366 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/chrome_browser_main_chromeos.cc ('k') | chrome/browser/profiles/profile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698