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_
10 #include "base/strings/string16.h"
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 // If a signed in service is reporting an error, returns the GlobalError
21 // object associated with that service, or NULL if no errors are reported.
22 GlobalError* GetSignedInServiceError(Profile* profile);
24 // Returns all errors reported by signed in services.
25 std::vector<GlobalError*> GetSignedInServiceErrors(Profile* profile);
27 // Return the label that should be displayed in the signin menu (i.e.
28 // "Sign in to Chromium", "Signin Error...", etc).
29 string16 GetSigninMenuLabel(Profile* profile);
31 void GetStatusLabelsForAuthError(Profile* profile,
32 const SigninManagerBase& signin_manager,
33 string16* status_label,
34 string16* link_label);
36 } // namespace signin_ui_util
38 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_UI_UTIL_H_