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

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

Issue 381953002: New avatar button: Consolidate text elision between Mac and Win/Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits2 Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
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 16 matching lines...) Expand all
27 void RegisterPrefs(PrefRegistrySimple* registry); 27 void RegisterPrefs(PrefRegistrySimple* registry);
28 28
29 // Returns the display name of the specified on-the-record profile (or guest), 29 // Returns the display name of the specified on-the-record profile (or guest),
30 // specified by |profile_path|, used in the avatar button or user manager. If 30 // specified by |profile_path|, used in the avatar button or user manager. If
31 // |profile_path| is the guest path, it will return IDS_GUEST_PROFILE_NAME. If 31 // |profile_path| is the guest path, it will return IDS_GUEST_PROFILE_NAME. If
32 // there is only one local profile present, it will return 32 // there is only one local profile present, it will return
33 // IDS_SINGLE_PROFILE_DISPLAY_NAME, unless the profile has a user entered 33 // IDS_SINGLE_PROFILE_DISPLAY_NAME, unless the profile has a user entered
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.
38 // This is essentially the name returned by GetAvatarNameForProfile, but it
39 // may be elided and contain an indicator for supervised users.
40 base::string16 GetAvatarButtonTextForProfile(Profile* profile);
41
37 // 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
38 // profile preferences, which triggers an update in the ProfileInfoCache. 43 // profile preferences, which triggers an update in the ProfileInfoCache.
39 void UpdateProfileName(Profile* profile, 44 void UpdateProfileName(Profile* profile,
40 const base::string16& new_profile_name); 45 const base::string16& new_profile_name);
41 46
42 // Returns the list of secondary accounts for a specific |profile|, which is 47 // Returns the list of secondary accounts for a specific |profile|, which is
43 // all the email addresses associated with the profile that are not equal to 48 // all the email addresses associated with the profile that are not equal to
44 // the |primary_account|. 49 // the |primary_account|.
45 std::vector<std::string> GetSecondaryAccountsForProfile( 50 std::vector<std::string> GetSecondaryAccountsForProfile(
46 Profile* profile, 51 Profile* profile,
47 const std::string& primary_account); 52 const std::string& primary_account);
48 53
49 // Returns whether the |browser|'s profile is a non-incognito or guest profile. 54 // Returns whether the |browser|'s profile is a non-incognito or guest profile.
50 // The distinction is needed because guest profiles are implemented as 55 // The distinction is needed because guest profiles are implemented as
51 // incognito profiles. 56 // incognito profiles.
52 bool IsRegularOrGuestSession(Browser* browser); 57 bool IsRegularOrGuestSession(Browser* browser);
53 58
54 // If the --google-profile-info flag is turned on, starts an update for a new 59 // If the --google-profile-info flag is turned on, starts an update for a new
55 // version of the Gaia profile picture. 60 // version of the Gaia profile picture.
56 void UpdateGaiaProfilePhotoIfNeeded(Profile* profile); 61 void UpdateGaiaProfilePhotoIfNeeded(Profile* profile);
57 62
58 // Returns the sign-in error controller for the given profile. Some profiles, 63 // Returns the sign-in error controller for the given profile. Some profiles,
59 // like guest profiles, may not have a controller so this function may return 64 // like guest profiles, may not have a controller so this function may return
60 // NULL. 65 // NULL.
61 SigninErrorController* GetSigninErrorController(Profile* profile); 66 SigninErrorController* GetSigninErrorController(Profile* profile);
62 67
63 } // namespace profiles 68 } // namespace profiles
64 69
65 #endif // CHROME_BROWSER_PROFILES_PROFILES_STATE_H_ 70 #endif // CHROME_BROWSER_PROFILES_PROFILES_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698