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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_PROFILES_PROFILES_STATE_H_
6 #define CHROME_BROWSER_PROFILES_PROFILES_STATE_H_
9 #include "base/strings/string16.h"
12 class PrefRegistrySimple;
14 namespace base { class FilePath; }
18 // Checks if multiple profiles is enabled.
19 bool IsMultipleProfilesEnabled();
21 // Returns the path to the default profile directory, based on the given
22 // user data directory.
23 base::FilePath GetDefaultProfileDir(const base::FilePath& user_data_dir);
25 // Register multi-profile related preferences in Local State.
26 void RegisterPrefs(PrefRegistrySimple* registry);
28 // Returns the display name of the active on-the-record profile (or guest).
29 base::string16 GetActiveProfileDisplayName(Browser* browser);
31 // Update the name of |profile| to |new_profile_name|. This updates the
32 // profile preferences, which triggers an update in the ProfileInfoCache.
33 void UpdateProfileName(Profile* profile,
34 const base::string16& new_profile_name);
36 // Returns the list of secondary accounts for a specific |profile|, which is
37 // all the email addresses associated with the profile that are not equal to
38 // the |primary_account|.
39 std::vector<std::string> GetSecondaryAccountsForProfile(
41 const std::string& primary_account);
43 // Returns whether the |browser|'s profile is a non-incognito or guest profile.
44 // The distinction is needed because guest profiles are implemented as
45 // incognito profiles.
46 bool IsRegularOrGuestSession(Browser* browser);
48 } // namespace profiles
50 #endif // CHROME_BROWSER_PROFILES_PROFILES_STATE_H_