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

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

Issue 129293002: Removing GetDefaultProfileOrOffTheRecord and GetDefaultProfile(<path>) from ProfileManager's (publi… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/profiles/profile_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // Get the profile for the user which created the current session. 56 // Get the profile for the user which created the current session.
57 // Note that in case of a guest account this will return a 'suitable' profile. 57 // Note that in case of a guest account this will return a 'suitable' profile.
58 static Profile* GetPrimaryUserProfile(); 58 static Profile* GetPrimaryUserProfile();
59 59
60 // Get the profile for the currently active user. 60 // Get the profile for the currently active user.
61 // Note that in case of a guest account this will return a 'suitable' profile. 61 // Note that in case of a guest account this will return a 'suitable' profile.
62 static Profile* GetActiveUserProfile(); 62 static Profile* GetActiveUserProfile();
63 63
64 // The following DEPRECATED functions should be removed: crbug.com/83792. 64 // The following DEPRECATED functions should be removed: crbug.com/83792.
65 65
66 // DEPRECATED: DO NOT USE unless in ChromeOS. 66 // DEPRECATED: DO NOT USE unless in ChromeOS.
Dmitry Polukhin 2014/01/08 23:44:14 I think comment should say that this function shou
Mr4D (OOO till 08-26) 2014/01/09 00:01:21 Makes sense - Done!
67 // Returns the default profile. This adds the profile to the 67 // Returns the default profile. This adds the profile to the
68 // ProfileManager if it doesn't already exist. This method returns NULL if 68 // ProfileManager if it doesn't already exist. This method returns NULL if
69 // the profile doesn't exist and we can't create it. 69 // the profile doesn't exist and we can't create it.
70 // The profile used can be overridden by using --login-profile on cros. 70 // The profile used can be overridden by using --login-profile on cros.
71 Profile* GetDefaultProfile(const base::FilePath& user_data_dir);
72
73 // DEPRECATED: DO NOT USE unless in ChromeOS.
74 // Same as instance method but provides the default user_data_dir as well.
75 // Note that in case of a guest account this will return a 'suitable' profile. 71 // Note that in case of a guest account this will return a 'suitable' profile.
76 static Profile* GetDefaultProfile(); 72 static Profile* GetDefaultProfile();
77 73
78 // DEPRECATED: DO NOT USE unless in ChromeOS.
79 // Same as GetDefaultProfile(). Do not use.
80 static Profile* GetDefaultProfileOrOffTheRecord();
81
82 // Returns a profile for a specific profile directory within the user data 74 // Returns a profile for a specific profile directory within the user data
83 // dir. This will return an existing profile it had already been created, 75 // dir. This will return an existing profile it had already been created,
84 // otherwise it will create and manage it. 76 // otherwise it will create and manage it.
85 Profile* GetProfile(const base::FilePath& profile_dir); 77 Profile* GetProfile(const base::FilePath& profile_dir);
86 78
87 // Returns total number of profiles available on this machine. 79 // Returns total number of profiles available on this machine.
88 size_t GetNumberOfProfiles(); 80 size_t GetNumberOfProfiles();
89 81
90 // Explicit asynchronous creation of a profile located at |profile_path|. 82 // Explicit asynchronous creation of a profile located at |profile_path|.
91 // If the profile has already been created then callback is called 83 // If the profile has already been created then callback is called
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 // Whether or not this profile should have a shortcut. 253 // Whether or not this profile should have a shortcut.
262 bool create_shortcut; 254 bool create_shortcut;
263 // List of callbacks to run when profile initialization is done. Note, when 255 // List of callbacks to run when profile initialization is done. Note, when
264 // profile is fully loaded this vector will be empty. 256 // profile is fully loaded this vector will be empty.
265 std::vector<CreateCallback> callbacks; 257 std::vector<CreateCallback> callbacks;
266 258
267 private: 259 private:
268 DISALLOW_COPY_AND_ASSIGN(ProfileInfo); 260 DISALLOW_COPY_AND_ASSIGN(ProfileInfo);
269 }; 261 };
270 262
263 // Returns the profile of the active user and / or the off the record profile
264 // if needed. This adds the profile to the ProfileManager if it doesn't
265 // already exist. The method will return NULL if the profile doesn't exist
266 // and we can't create it.
267 // The profile used can be overridden by using --login-profile on cros.
268 Profile* GetActiveUserOrOffTheRecordProfileFromPath(
269 const base::FilePath& user_data_dir);
270
271 // Adds a pre-existing Profile object to the set managed by this 271 // Adds a pre-existing Profile object to the set managed by this
272 // ProfileManager. This ProfileManager takes ownership of the Profile. 272 // ProfileManager. This ProfileManager takes ownership of the Profile.
273 // The Profile should not already be managed by this ProfileManager. 273 // The Profile should not already be managed by this ProfileManager.
274 // Returns true if the profile was added, false otherwise. 274 // Returns true if the profile was added, false otherwise.
275 bool AddProfile(Profile* profile); 275 bool AddProfile(Profile* profile);
276 276
277 // Schedules the profile at the given path to be deleted on shutdown. 277 // Schedules the profile at the given path to be deleted on shutdown.
278 void FinishDeletingProfile(const base::FilePath& profile_dir); 278 void FinishDeletingProfile(const base::FilePath& profile_dir);
279 279
280 // Registers profile with given info. Returns pointer to created ProfileInfo 280 // Registers profile with given info. Returns pointer to created ProfileInfo
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 class ProfileManagerWithoutInit : public ProfileManager { 375 class ProfileManagerWithoutInit : public ProfileManager {
376 public: 376 public:
377 explicit ProfileManagerWithoutInit(const base::FilePath& user_data_dir); 377 explicit ProfileManagerWithoutInit(const base::FilePath& user_data_dir);
378 378
379 protected: 379 protected:
380 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {} 380 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {}
381 virtual void DoFinalInitLogging(Profile*) OVERRIDE {} 381 virtual void DoFinalInitLogging(Profile*) OVERRIDE {}
382 }; 382 };
383 383
384 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ 384 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/profiles/profile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698