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

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: Addressed comment 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 // Helper function that returns true if incognito mode is forced for |profile|
63 // (normal mode is not available for browsing).
64 static bool IncognitoModeForced(Profile* profile);
65
62 // Same as instance method but provides the default user_data_dir as well. 66 // Same as instance method but provides the default user_data_dir as well.
63 static std::vector<Profile*> GetLastOpenedProfiles(); 67 static std::vector<Profile*> GetLastOpenedProfiles();
64 68
65 // Get the profile for the user which created the current session. 69 // 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. 70 // 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 71 // This function is temporary and will soon be moved to ash. As such avoid
68 // using it at all cost. 72 // using it at all cost.
69 // TODO(skuhne): Move into ash's new user management function. 73 // TODO(skuhne): Move into ash's new user management function.
70 static Profile* GetPrimaryUserProfile(); 74 static Profile* GetPrimaryUserProfile();
71 75
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 class ProfileManagerWithoutInit : public ProfileManager { 408 class ProfileManagerWithoutInit : public ProfileManager {
405 public: 409 public:
406 explicit ProfileManagerWithoutInit(const base::FilePath& user_data_dir); 410 explicit ProfileManagerWithoutInit(const base::FilePath& user_data_dir);
407 411
408 protected: 412 protected:
409 void DoFinalInitForServices(Profile*, bool) override {} 413 void DoFinalInitForServices(Profile*, bool) override {}
410 void DoFinalInitLogging(Profile*) override {} 414 void DoFinalInitLogging(Profile*) override {}
411 }; 415 };
412 416
413 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ 417 #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