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

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

Issue 2938863002: Merge "cros: Fix loading user profile w/o UserSessionManager" (Closed)
Patch Set: Created 3 years, 6 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
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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // TODO(skuhne): Move into ash's new user management function. 74 // TODO(skuhne): Move into ash's new user management function.
75 static Profile* GetPrimaryUserProfile(); 75 static Profile* GetPrimaryUserProfile();
76 76
77 // Get the profile for the currently active user. 77 // Get the profile for the currently active user.
78 // Note that in case of a guest account this will return a 'suitable' profile. 78 // Note that in case of a guest account this will return a 'suitable' profile.
79 // This function is temporary and will soon be moved to ash. As such avoid 79 // This function is temporary and will soon be moved to ash. As such avoid
80 // using it at all cost. 80 // using it at all cost.
81 // TODO(skuhne): Move into ash's new user management function. 81 // TODO(skuhne): Move into ash's new user management function.
82 static Profile* GetActiveUserProfile(); 82 static Profile* GetActiveUserProfile();
83 83
84 // Load and return the initial profile for browser. On ChromeOS, this returns
85 // either the sign-in profile or the active user profile depending on whether
86 // browser is started normally or is restarted after crash. On other
87 // platforms, this returns the default profile.
88 static Profile* CreateInitialProfile();
89
84 // Returns a profile for a specific profile directory within the user data 90 // Returns a profile for a specific profile directory within the user data
85 // dir. This will return an existing profile it had already been created, 91 // dir. This will return an existing profile it had already been created,
86 // otherwise it will create and manage it. 92 // otherwise it will create and manage it.
87 // Because this method might synchronously create a new profile, it should 93 // Because this method might synchronously create a new profile, it should
88 // only be called for the initial profile or in tests, where blocking is 94 // only be called for the initial profile or in tests, where blocking is
89 // acceptable. Returns null if creation of the new profile fails. 95 // acceptable. Returns null if creation of the new profile fails.
90 // TODO(bauerb): Migrate calls from other code to GetProfileByPath(), then 96 // TODO(bauerb): Migrate calls from other code to GetProfileByPath(), then
91 // make this method private. 97 // make this method private.
92 Profile* GetProfile(const base::FilePath& profile_dir); 98 Profile* GetProfile(const base::FilePath& profile_dir);
93 99
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 class ProfileManagerWithoutInit : public ProfileManager { 441 class ProfileManagerWithoutInit : public ProfileManager {
436 public: 442 public:
437 explicit ProfileManagerWithoutInit(const base::FilePath& user_data_dir); 443 explicit ProfileManagerWithoutInit(const base::FilePath& user_data_dir);
438 444
439 protected: 445 protected:
440 void DoFinalInitForServices(Profile*, bool) override {} 446 void DoFinalInitForServices(Profile*, bool) override {}
441 void DoFinalInitLogging(Profile*) override {} 447 void DoFinalInitLogging(Profile*) override {}
442 }; 448 };
443 449
444 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ 450 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698