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

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

Issue 1968703002: MD User Manager: Creates new browser window for last active profile if one is not available (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Initial Created 4 years, 7 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
« no previous file with comments | « no previous file | 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 <stddef.h> 10 #include <stddef.h>
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // Same as instance method but provides the default user_data_dir as well. 52 // Same as instance method but provides the default user_data_dir as well.
53 // If the Profile is going to be used to open a new window then consider using 53 // If the Profile is going to be used to open a new window then consider using
54 // GetLastUsedProfileAllowedByPolicy() instead. 54 // GetLastUsedProfileAllowedByPolicy() instead.
55 static Profile* GetLastUsedProfile(); 55 static Profile* GetLastUsedProfile();
56 56
57 // Same as GetLastUsedProfile() but returns the incognito Profile if 57 // Same as GetLastUsedProfile() but returns the incognito Profile if
58 // incognito mode is forced. This should be used if the last used Profile 58 // incognito mode is forced. This should be used if the last used Profile
59 // will be used to open new browser windows. 59 // will be used to open new browser windows.
60 static Profile* GetLastUsedProfileAllowedByPolicy(); 60 static Profile* GetLastUsedProfileAllowedByPolicy();
61 61
62 // Returns true if incognito mode is forced.
anthonyvd 2016/05/11 18:04:03 nit: expand a bit on what this implies.
Moe 2016/05/13 17:18:12 Done.
63 static bool IncognitoModeForced(Profile* profile);
64
62 // Same as instance method but provides the default user_data_dir as well. 65 // Same as instance method but provides the default user_data_dir as well.
63 static std::vector<Profile*> GetLastOpenedProfiles(); 66 static std::vector<Profile*> GetLastOpenedProfiles();
64 67
65 // Get the profile for the user which created the current session. 68 // Get the profile for the user which created the current session.
66 // Note that in case of a guest account this will return a 'suitable' profile. 69 // Note that in case of a guest account this will return a 'suitable' profile.
67 // This function is temporary and will soon be moved to ash. As such avoid 70 // This function is temporary and will soon be moved to ash. As such avoid
68 // using it at all cost. 71 // using it at all cost.
69 // TODO(skuhne): Move into ash's new user management function. 72 // TODO(skuhne): Move into ash's new user management function.
70 static Profile* GetPrimaryUserProfile(); 73 static Profile* GetPrimaryUserProfile();
71 74
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 class ProfileManagerWithoutInit : public ProfileManager { 407 class ProfileManagerWithoutInit : public ProfileManager {
405 public: 408 public:
406 explicit ProfileManagerWithoutInit(const base::FilePath& user_data_dir); 409 explicit ProfileManagerWithoutInit(const base::FilePath& user_data_dir);
407 410
408 protected: 411 protected:
409 void DoFinalInitForServices(Profile*, bool) override {} 412 void DoFinalInitForServices(Profile*, bool) override {}
410 void DoFinalInitLogging(Profile*) override {} 413 void DoFinalInitLogging(Profile*) override {}
411 }; 414 };
412 415
413 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ 416 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698