| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 static base::FilePath GetProfilePathByUserIdHash( | 44 static base::FilePath GetProfilePathByUserIdHash( |
| 45 const std::string& user_id_hash); | 45 const std::string& user_id_hash); |
| 46 | 46 |
| 47 // Returns OffTheRecord profile for use during signing phase. | 47 // Returns OffTheRecord profile for use during signing phase. |
| 48 static Profile* GetSigninProfile(); | 48 static Profile* GetSigninProfile(); |
| 49 | 49 |
| 50 // Returns user_id hash for |profile| instance or empty string if hash | 50 // Returns user_id hash for |profile| instance or empty string if hash |
| 51 // could not be extracted from |profile|. | 51 // could not be extracted from |profile|. |
| 52 static std::string GetUserIdHashFromProfile(Profile* profile); | 52 static std::string GetUserIdHashFromProfile(Profile* profile); |
| 53 | 53 |
| 54 // Returns true if |profile| is the signin Profile. This can be used during | |
| 55 // construction of the signin Profile to determine if that Profile is the | |
| 56 // signin Profile. | |
| 57 static bool IsSigninProfile(Profile* profile); | |
| 58 | |
| 59 // Initialize a bunch of services that are tied to a browser profile. | 54 // Initialize a bunch of services that are tied to a browser profile. |
| 60 // TODO(dzhioev): Investigate whether or not this method is needed. | 55 // TODO(dzhioev): Investigate whether or not this method is needed. |
| 61 void ProfileStartup(Profile* profile, bool process_startup); | 56 void ProfileStartup(Profile* profile, bool process_startup); |
| 62 | 57 |
| 63 // Returns active user profile dir in a format [u-$hash]. | 58 // Returns active user profile dir in a format [u-$hash]. |
| 64 base::FilePath GetActiveUserProfileDir(); | 59 base::FilePath GetActiveUserProfileDir(); |
| 65 | 60 |
| 66 // Returns user profile dir in a format [u-user_id_hash]. | 61 // Returns user profile dir in a format [u-user_id_hash]. |
| 67 base::FilePath GetUserProfileDir(const std::string& user_id_hash); | 62 base::FilePath GetUserProfileDir(const std::string& user_id_hash); |
| 68 | 63 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 99 | 94 |
| 100 // List of callbacks called after signin profile clearance. | 95 // List of callbacks called after signin profile clearance. |
| 101 std::vector<base::Closure> on_clear_callbacks_; | 96 std::vector<base::Closure> on_clear_callbacks_; |
| 102 | 97 |
| 103 DISALLOW_COPY_AND_ASSIGN(ProfileHelper); | 98 DISALLOW_COPY_AND_ASSIGN(ProfileHelper); |
| 104 }; | 99 }; |
| 105 | 100 |
| 106 } // namespace chromeos | 101 } // namespace chromeos |
| 107 | 102 |
| 108 #endif // CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_HELPER_H_ | 103 #endif // CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_HELPER_H_ |
| OLD | NEW |