| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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_PROFILES_PROFILES_STATE_H_ | 5 #ifndef CHROME_BROWSER_PROFILES_PROFILES_STATE_H_ |
| 6 #define CHROME_BROWSER_PROFILES_PROFILES_STATE_H_ | 6 #define CHROME_BROWSER_PROFILES_PROFILES_STATE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 // custom name. | 34 // custom name. |
| 35 base::string16 GetAvatarNameForProfile(const base::FilePath& profile_path); | 35 base::string16 GetAvatarNameForProfile(const base::FilePath& profile_path); |
| 36 | 36 |
| 37 // Returns the string to use in the avatar button for the specified profile. | 37 // Returns the string to use in the avatar button for the specified profile. |
| 38 // This is essentially the name returned by GetAvatarNameForProfile, but it | 38 // This is essentially the name returned by GetAvatarNameForProfile, but it |
| 39 // may be elided and contain an indicator for supervised users. | 39 // may be elided and contain an indicator for supervised users. |
| 40 base::string16 GetAvatarButtonTextForProfile(Profile* profile); | 40 base::string16 GetAvatarButtonTextForProfile(Profile* profile); |
| 41 | 41 |
| 42 // Update the name of |profile| to |new_profile_name|. This updates the | 42 // Update the name of |profile| to |new_profile_name|. This updates the |
| 43 // profile preferences, which triggers an update in the ProfileInfoCache. | 43 // profile preferences, which triggers an update in the ProfileInfoCache. |
| 44 // This method should be called when the user is explicitely changing |
| 45 // the profile name, as it will always set |prefs::kProfileUsingDefaultName| |
| 46 // to false. |
| 44 void UpdateProfileName(Profile* profile, | 47 void UpdateProfileName(Profile* profile, |
| 45 const base::string16& new_profile_name); | 48 const base::string16& new_profile_name); |
| 46 | 49 |
| 47 // Returns the list of secondary accounts for a specific |profile|, which is | 50 // Returns the list of secondary accounts for a specific |profile|, which is |
| 48 // all the email addresses associated with the profile that are not equal to | 51 // all the email addresses associated with the profile that are not equal to |
| 49 // the |primary_account|. | 52 // the |primary_account|. |
| 50 std::vector<std::string> GetSecondaryAccountsForProfile( | 53 std::vector<std::string> GetSecondaryAccountsForProfile( |
| 51 Profile* profile, | 54 Profile* profile, |
| 52 const std::string& primary_account); | 55 const std::string& primary_account); |
| 53 | 56 |
| 54 // Returns whether the |browser|'s profile is a non-incognito or guest profile. | 57 // Returns whether the |browser|'s profile is a non-incognito or guest profile. |
| 55 // The distinction is needed because guest profiles are implemented as | 58 // The distinction is needed because guest profiles are implemented as |
| 56 // incognito profiles. | 59 // incognito profiles. |
| 57 bool IsRegularOrGuestSession(Browser* browser); | 60 bool IsRegularOrGuestSession(Browser* browser); |
| 58 | 61 |
| 59 // If the --google-profile-info flag is turned on, starts an update for a new | 62 // If the --google-profile-info flag is turned on, starts an update for a new |
| 60 // version of the Gaia profile picture. | 63 // version of the Gaia profile picture. |
| 61 void UpdateGaiaProfilePhotoIfNeeded(Profile* profile); | 64 void UpdateGaiaProfilePhotoIfNeeded(Profile* profile); |
| 62 | 65 |
| 63 // Returns the sign-in error controller for the given profile. Some profiles, | 66 // Returns the sign-in error controller for the given profile. Some profiles, |
| 64 // like guest profiles, may not have a controller so this function may return | 67 // like guest profiles, may not have a controller so this function may return |
| 65 // NULL. | 68 // NULL. |
| 66 SigninErrorController* GetSigninErrorController(Profile* profile); | 69 SigninErrorController* GetSigninErrorController(Profile* profile); |
| 67 | 70 |
| 68 } // namespace profiles | 71 } // namespace profiles |
| 69 | 72 |
| 70 #endif // CHROME_BROWSER_PROFILES_PROFILES_STATE_H_ | 73 #endif // CHROME_BROWSER_PROFILES_PROFILES_STATE_H_ |
| OLD | NEW |