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

Side by Side Diff: chrome/browser/signin/signin_ui_util.h

Issue 2435053002: Remove the sign-in menu item on macOS. (Closed)
Patch Set: Rebase Created 4 years, 2 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
« no previous file with comments | « chrome/browser/app_controller_mac_unittest.mm ('k') | chrome/browser/signin/signin_ui_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_SIGNIN_SIGNIN_UI_UTIL_H_ 5 #ifndef CHROME_BROWSER_SIGNIN_SIGNIN_UI_UTIL_H_
6 #define CHROME_BROWSER_SIGNIN_SIGNIN_UI_UTIL_H_ 6 #define CHROME_BROWSER_SIGNIN_SIGNIN_UI_UTIL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
11 11
12 class GlobalError; 12 class GlobalError;
13 class Profile; 13 class Profile;
14 class SigninManagerBase; 14 class SigninManagerBase;
15 15
16 // Utility functions to gather status information from the various signed in 16 // Utility functions to gather status information from the various signed in
17 // services and construct messages suitable for showing in UI. 17 // services and construct messages suitable for showing in UI.
18 namespace signin_ui_util { 18 namespace signin_ui_util {
19 19
20 // The maximum number of times to show the welcome tutorial for an upgrade user. 20 // The maximum number of times to show the welcome tutorial for an upgrade user.
21 const int kUpgradeWelcomeTutorialShowMax = 1; 21 const int kUpgradeWelcomeTutorialShowMax = 1;
22 22
23 // Returns the label that should be displayed in the signin menu (i.e.
24 // "Sign in to Chromium", "Signin Error...", etc).
25 base::string16 GetSigninMenuLabel(Profile* profile);
26
27 void GetStatusLabelsForAuthError(Profile* profile, 23 void GetStatusLabelsForAuthError(Profile* profile,
28 const SigninManagerBase& signin_manager, 24 const SigninManagerBase& signin_manager,
29 base::string16* status_label, 25 base::string16* status_label,
30 base::string16* link_label); 26 base::string16* link_label);
31 27
32 // Returns the username of the authenticated user or an empty string if there is 28 // Returns the username of the authenticated user or an empty string if there is
33 // no authenticated user. 29 // no authenticated user.
34 base::string16 GetAuthenticatedUsername(const SigninManagerBase* signin); 30 base::string16 GetAuthenticatedUsername(const SigninManagerBase* signin);
35 31
36 // Initializes signin-related preferences. 32 // Initializes signin-related preferences.
37 void InitializePrefsForProfile(Profile* profile); 33 void InitializePrefsForProfile(Profile* profile);
38 34
39 // Shows a learn more page for signin errors. 35 // Shows a learn more page for signin errors.
40 void ShowSigninErrorLearnMorePage(Profile* profile); 36 void ShowSigninErrorLearnMorePage(Profile* profile);
41 37
42 // Returns the display email string for the given account. If the profile 38 // Returns the display email string for the given account. If the profile
43 // has not been migrated to use gaia ids, then its possible for the display 39 // has not been migrated to use gaia ids, then its possible for the display
44 // to not ne known yet. In this case, use |account_id|, which is assumed to 40 // to not ne known yet. In this case, use |account_id|, which is assumed to
45 // be an email address. 41 // be an email address.
46 std::string GetDisplayEmail(Profile* profile, const std::string& account_id); 42 std::string GetDisplayEmail(Profile* profile, const std::string& account_id);
47 43
48 } // namespace signin_ui_util 44 } // namespace signin_ui_util
49 45
50 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_UI_UTIL_H_ 46 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_UI_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/app_controller_mac_unittest.mm ('k') | chrome/browser/signin/signin_ui_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698