OLD | NEW |
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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 static base::FilePath GetUserProfileDir(const std::string& user_id_hash); | 78 static base::FilePath GetUserProfileDir(const std::string& user_id_hash); |
79 | 79 |
80 // Returns true if |profile| is the signin Profile. This can be used during | 80 // Returns true if |profile| is the signin Profile. This can be used during |
81 // construction of the signin Profile to determine if that Profile is the | 81 // construction of the signin Profile to determine if that Profile is the |
82 // signin Profile. | 82 // signin Profile. |
83 static bool IsSigninProfile(Profile* profile); | 83 static bool IsSigninProfile(Profile* profile); |
84 | 84 |
85 // Returns true when |profile| corresponds to owner's profile. | 85 // Returns true when |profile| corresponds to owner's profile. |
86 static bool IsOwnerProfile(Profile* profile); | 86 static bool IsOwnerProfile(Profile* profile); |
87 | 87 |
| 88 // Returns true when |profile| corresponds to the primary user profile |
| 89 // of the current session. |
| 90 static bool IsPrimaryProfile(Profile* profile); |
| 91 |
88 // Initialize a bunch of services that are tied to a browser profile. | 92 // Initialize a bunch of services that are tied to a browser profile. |
89 // TODO(dzhioev): Investigate whether or not this method is needed. | 93 // TODO(dzhioev): Investigate whether or not this method is needed. |
90 void ProfileStartup(Profile* profile, bool process_startup); | 94 void ProfileStartup(Profile* profile, bool process_startup); |
91 | 95 |
92 // Returns active user profile dir in a format [u-$hash]. | 96 // Returns active user profile dir in a format [u-$hash]. |
93 base::FilePath GetActiveUserProfileDir(); | 97 base::FilePath GetActiveUserProfileDir(); |
94 | 98 |
95 // Should called once after UserManager instance has been created. | 99 // Should called once after UserManager instance has been created. |
96 void Initialize(); | 100 void Initialize(); |
97 | 101 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 // If true and enable_profile_to_user_testing is true then primary user will | 176 // If true and enable_profile_to_user_testing is true then primary user will |
173 // always be returned by GetUserByProfile(). | 177 // always be returned by GetUserByProfile(). |
174 static bool always_return_primary_user_for_testing; | 178 static bool always_return_primary_user_for_testing; |
175 | 179 |
176 DISALLOW_COPY_AND_ASSIGN(ProfileHelper); | 180 DISALLOW_COPY_AND_ASSIGN(ProfileHelper); |
177 }; | 181 }; |
178 | 182 |
179 } // namespace chromeos | 183 } // namespace chromeos |
180 | 184 |
181 #endif // CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_HELPER_H_ | 185 #endif // CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_HELPER_H_ |
OLD | NEW |