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

Side by Side Diff: chrome/browser/chromeos/profiles/profile_helper.h

Issue 2918203002: cros: Fix loading user profile w/o UserSessionManager (Closed)
Patch Set: rebase 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #ifndef CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_HELPER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_HELPER_H_
6 #define CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_HELPER_H_ 6 #define CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_HELPER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 public user_manager::UserManager::UserSessionStateObserver { 69 public user_manager::UserManager::UserSessionStateObserver {
70 public: 70 public:
71 ProfileHelper(); 71 ProfileHelper();
72 ~ProfileHelper() override; 72 ~ProfileHelper() override;
73 73
74 // Returns ProfileHelper instance. This class is not singleton and is owned 74 // Returns ProfileHelper instance. This class is not singleton and is owned
75 // by BrowserProcess/BrowserProcessPlatformPart. This method keeps that 75 // by BrowserProcess/BrowserProcessPlatformPart. This method keeps that
76 // knowledge in one place. 76 // knowledge in one place.
77 static ProfileHelper* Get(); 77 static ProfileHelper* Get();
78 78
79 // Returns Profile instance that corresponds to |user_id_hash|. 79 // Loads and returns Profile instance that corresponds to |user_id_hash| for
80 static Profile* GetProfileByUserIdHash(const std::string& user_id_hash); 80 // test. It should not be used in production code because it could load a
81 // not-yet-loaded user profile and skip the user profile initialization code
82 // in UserSessionManager.
83 // See http://crbug.com/728683 and http://crbug.com/718734.
84 static Profile* GetProfileByUserIdHashForTest(
85 const std::string& user_id_hash);
81 86
82 // Returns profile path that corresponds to a given |user_id_hash|. 87 // Returns profile path that corresponds to a given |user_id_hash|.
83 static base::FilePath GetProfilePathByUserIdHash( 88 static base::FilePath GetProfilePathByUserIdHash(
84 const std::string& user_id_hash); 89 const std::string& user_id_hash);
85 90
86 // Returns the path that corresponds to the sign-in profile. 91 // Returns the path that corresponds to the sign-in profile.
87 static base::FilePath GetSigninProfileDir(); 92 static base::FilePath GetSigninProfileDir();
88 93
89 // Returns OffTheRecord profile for use during signing phase. 94 // Returns OffTheRecord profile for use during signing phase.
90 static Profile* GetSigninProfile(); 95 static Profile* GetSigninProfile();
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 std::unique_ptr<FileFlusher> profile_flusher_; 247 std::unique_ptr<FileFlusher> profile_flusher_;
243 248
244 base::WeakPtrFactory<ProfileHelper> weak_factory_; 249 base::WeakPtrFactory<ProfileHelper> weak_factory_;
245 250
246 DISALLOW_COPY_AND_ASSIGN(ProfileHelper); 251 DISALLOW_COPY_AND_ASSIGN(ProfileHelper);
247 }; 252 };
248 253
249 } // namespace chromeos 254 } // namespace chromeos
250 255
251 #endif // CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_HELPER_H_ 256 #endif // CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/users/user_manager_unittest.cc ('k') | chrome/browser/chromeos/profiles/profile_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698