MD Downloads: UI review feedback
[chromium-blink-merge.git] / chrome / browser / signin / signin_ui_util.h
blob34458dd092a732a623dae80e373c309e99b210e7
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SIGNIN_SIGNIN_UI_UTIL_H_
6 #define CHROME_BROWSER_SIGNIN_SIGNIN_UI_UTIL_H_
8 #include <vector>
10 #include "base/strings/string16.h"
12 class GlobalError;
13 class Profile;
14 class SigninManagerBase;
16 // Utility functions to gather status information from the various signed in
17 // services and construct messages suitable for showing in UI.
18 namespace signin_ui_util {
20 // The maximum number of times to show the welcome tutorial for an upgrade user.
21 const int kUpgradeWelcomeTutorialShowMax = 1;
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);
27 void GetStatusLabelsForAuthError(Profile* profile,
28 const SigninManagerBase& signin_manager,
29 base::string16* status_label,
30 base::string16* link_label);
32 // Initializes signin-related preferences.
33 void InitializePrefsForProfile(Profile* profile);
35 // Shows a learn more page for signin errors.
36 void ShowSigninErrorLearnMorePage(Profile* profile);
38 // Returns the display email string for the given account. If the profile
39 // has not been migrated to use gaia ids, then its possible for the display
40 // to not ne known yet. In this case, use |account_id|, which is assumed to
41 // be an email address.
42 std::string GetDisplayEmail(Profile* profile, const std::string& account_id);
44 } // namespace signin_ui_util
46 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_UI_UTIL_H_