summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authortommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-05 22:49:26 +0000
committertommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-05 22:49:26 +0000
commit986aaafb60707cf7f7617cec029234d65ab5f842 (patch)
tree93d5701ca1e3be159d3276d6265cbff73fee88d9 /chrome
parent388dd3a1688b3af37e804966fadfe83e6d46abc9 (diff)
downloadchromium_src-986aaafb60707cf7f7617cec029234d65ab5f842.zip
chromium_src-986aaafb60707cf7f7617cec029234d65ab5f842.tar.gz
chromium_src-986aaafb60707cf7f7617cec029234d65ab5f842.tar.bz2
Make the other GetProfile() method public.
The way the default profiles, extensions and services are initialized has changed in a way that makes it hard or even impossible to tweak profile preferences before extensions are initialized. For example SafeWeb is initialized as part of referencing the default profile. Upon being initialized, it refers back to the default profile and its preferences (that are currently being constructed), so there's no 'public' way of fetching the default profile, tweak preferences and and _then_ initialize services. However, by allowing calls to GetProfile(path, init_extensions), we can again do two phased profile/extension initialization as we used to. Note that GetProfile(path) is already public. TEST=none BUG=none Review URL: http://codereview.chromium.org/1986001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46512 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/profile_manager.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/chrome/browser/profile_manager.h b/chrome/browser/profile_manager.h
index a7a8574..711fcf1 100644
--- a/chrome/browser/profile_manager.h
+++ b/chrome/browser/profile_manager.h
@@ -93,6 +93,15 @@ class ProfileManager : public NonThreadSafe,
// otherwise it will create and manage it.
Profile* GetProfile(const FilePath& profile_dir);
+ // Returns a profile for a specific profile directory within the user data
+ // dir with the option of controlling whether extensions are initialized
+ // or not. This will return an existing profile it had already been created,
+ // otherwise it will create and manage it.
+ // Note that if the profile has already been created, extensions may have
+ // been initialized. If this matters to you, you should call GetProfileByPath
+ // first to see if the profile already exists.
+ Profile* GetProfile(const FilePath& profile_dir, bool init_extensions);
+
// These allow iteration through the current list of profiles.
typedef std::vector<Profile*> ProfileVector;
typedef ProfileVector::iterator iterator;
@@ -148,8 +157,6 @@ class ProfileManager : public NonThreadSafe,
// Returns true if the profile was added, false otherwise.
bool AddProfile(Profile* profile, bool init_extensions);
- Profile* GetProfile(const FilePath& profile_dir, bool init_extensions);
-
// We keep a simple vector of profiles rather than something fancier
// because we expect there to be a small number of profiles active.
ProfileVector profiles_;