Lines Matching refs:profile
20 #include "chrome/browser/profiles/profile.h"
30 public Profile::Delegate {
34 // This method is called when profile is ready. If profile creation has been
35 // failed, method is called with |profile| equals to NULL.
36 virtual void OnProfileCreated(Profile* profile) = 0;
45 // Returns the default profile. This adds the profile to the
47 // the profile doesn't exist and we can't create it.
48 // The profile used can be overridden by using --login-profile on cros.
49 Profile* GetDefaultProfile(const FilePath& user_data_dir);
52 static Profile* GetDefaultProfile();
54 // Returns a profile for a specific profile directory within the user data
55 // dir. This will return an existing profile it had already been created,
57 Profile* GetProfile(const FilePath& profile_dir);
59 // Explicit asynchronous creation of the profile. |observer| is called
60 // when profile is created. If profile has already been created, observer
65 // Initiates default profile creation. If default profile has already been
69 // Returns the profile with the given |profile_id| or NULL if no such profile
71 Profile* GetProfileWithId(ProfileId profile_id);
73 // Returns true if the profile pointer is known to point to an existing
74 // profile.
75 bool IsValidProfile(Profile* profile);
77 // Returns the directory where the currently active profile is
83 std::vector<Profile*> GetLoadedProfiles() const;
96 // Returns the path to the default profile directory, based on the given
100 // Returns the path to the preferences file given the user profile directory.
103 // If a profile with the given path is currently managed by this object,
104 // return a pointer to the corresponding Profile object;
106 Profile* GetProfileByPath(const FilePath& path) const;
108 // Profile::Delegate implementation:
109 virtual void OnProfileCreated(Profile* profile, bool success);
113 virtual void DoFinalInit(Profile* profile);
121 ProfileInfo(Profile* profile, bool created)
122 : profile(profile), created(created) {
127 scoped_ptr<Profile> profile;
128 // Whether profile has been fully loaded (created and initialized).
130 // List of observers which should be notified when profile initialization is
131 // done. Note, when profile is fully loaded this vector will be empty.
138 // Adds a pre-existing Profile object to the set managed by this
139 // ProfileManager. This ProfileManager takes ownership of the Profile.
140 // The Profile should not already be managed by this ProfileManager.
141 // Returns true if the profile was added, false otherwise.
142 bool AddProfile(Profile* profile);
144 // Registers profile with given info. Returns pointer to created ProfileInfo
146 ProfileInfo* RegisterProfile(Profile* profile, bool created);
150 // Indicates that a user has logged in and that the profile specified
151 // in the --login-profile command line argument should be used as the
155 // Maps profile path to ProfileInfo (if profile has been created). Use
164 // profile. This one is useful in unittests.
167 virtual void DoFinalInit(Profile*) {}