summaryrefslogtreecommitdiffstats
path: root/chrome/browser/profiles/profiles_state.h
diff options
context:
space:
mode:
authornoms@chromium.org <noms@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-23 22:12:12 +0000
committernoms@chromium.org <noms@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-23 22:12:12 +0000
commit25d0b8b724f0cc2d7041e8cf8ae040efe129d95f (patch)
tree7eb15304d5ba58a5d5ae84569cea8a69e62db66a /chrome/browser/profiles/profiles_state.h
parent8c7747f02380085d196b7c844ebf65f1092fafdf (diff)
downloadchromium_src-25d0b8b724f0cc2d7041e8cf8ae040efe129d95f.zip
chromium_src-25d0b8b724f0cc2d7041e8cf8ae040efe129d95f.tar.gz
chromium_src-25d0b8b724f0cc2d7041e8cf8ae040efe129d95f.tar.bz2
[Mac] Redesign of the avatar menu button.
- Made the (old) avatar icon badge be a subclass of the (future, new in this CL) avatar button, and moved the common code (opening the avatar bubble, listening to profile changes) up in the parent class. - Made this class use a ProfileInfoCacheObserver rather than the NotificationService - Added unit tests for the new code - Small change in c/b/ui/views/frame/browser_view.cc to re-use a new method in profiles_state.cc that checks whether a profile is a normal/guest mode profile (i.e. not incognito) Screenshots: https://drive.google.com/folderview?id=0B1B1Up4p2NRMUW5zeFp6MkY5UDA&usp=sharing This is behind the --new-profile-management flag, and shows the avatar switcher as a menu button in the caption area. The button shows the user's name, rather than an image. BUG=324036 TEST=With the --new-profile-management flag on, start Chrome. Whether you have one user or more, you should see a button in the top right corner of the browser displaying the active profile's name. The guest browser should display "Guest", and the button should work otherwise as the existing avatar icon. In incognito mode, the spy dude icon should be displayed as before. Review URL: https://codereview.chromium.org/117533002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246700 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profiles/profiles_state.h')
-rw-r--r--chrome/browser/profiles/profiles_state.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/profiles/profiles_state.h b/chrome/browser/profiles/profiles_state.h
index 846d2b2..ab76642 100644
--- a/chrome/browser/profiles/profiles_state.h
+++ b/chrome/browser/profiles/profiles_state.h
@@ -43,6 +43,11 @@ std::vector<std::string> GetSecondaryAccountsForProfile(
Profile* profile,
const std::string& primary_account);
+// Returns whether the |browser|'s profile is a non-incognito or guest profile.
+// The distinction is needed because guest profiles are implemented as
+// incognito profiles.
+bool IsRegularOrGuestSession(Browser* browser);
+
} // namespace profiles
#endif // CHROME_BROWSER_PROFILES_PROFILES_STATE_H_