OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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_PROFILES_PROFILES_STATE_H_ | 5 #ifndef CHROME_BROWSER_PROFILES_PROFILES_STATE_H_ |
6 #define CHROME_BROWSER_PROFILES_PROFILES_STATE_H_ | 6 #define CHROME_BROWSER_PROFILES_PROFILES_STATE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 | 10 |
11 class Browser; | 11 class Browser; |
12 class PrefRegistrySimple; | 12 class PrefRegistrySimple; |
13 class Profile; | 13 class Profile; |
14 class SigninErrorController; | 14 class SigninErrorController; |
15 namespace base { class FilePath; } | 15 namespace base { class FilePath; } |
16 | 16 |
17 namespace profiles { | 17 namespace profiles { |
18 | 18 |
| 19 // The determining factor around whether lock needs to be updated will change |
| 20 // over time. |
| 21 // Version 1 - non-hosted domains (gmail.com) and google.com permitted only. |
| 22 const int kCurrentLockAlgorithmVersion = 1; |
| 23 |
19 // Checks if multiple profiles is enabled. | 24 // Checks if multiple profiles is enabled. |
20 bool IsMultipleProfilesEnabled(); | 25 bool IsMultipleProfilesEnabled(); |
21 | 26 |
22 // Returns the path to the default profile directory, based on the given | 27 // Returns the path to the default profile directory, based on the given |
23 // user data directory. | 28 // user data directory. |
24 base::FilePath GetDefaultProfileDir(const base::FilePath& user_data_dir); | 29 base::FilePath GetDefaultProfileDir(const base::FilePath& user_data_dir); |
25 | 30 |
26 // Register multi-profile related preferences in Local State. | 31 // Register multi-profile related preferences in Local State. |
27 void RegisterPrefs(PrefRegistrySimple* registry); | 32 void RegisterPrefs(PrefRegistrySimple* registry); |
28 | 33 |
(...skipping 23 matching lines...) Expand all Loading... |
52 // the |primary_account|. | 57 // the |primary_account|. |
53 std::vector<std::string> GetSecondaryAccountsForProfile( | 58 std::vector<std::string> GetSecondaryAccountsForProfile( |
54 Profile* profile, | 59 Profile* profile, |
55 const std::string& primary_account); | 60 const std::string& primary_account); |
56 | 61 |
57 // Returns whether the |browser|'s profile is a non-incognito or guest profile. | 62 // Returns whether the |browser|'s profile is a non-incognito or guest profile. |
58 // The distinction is needed because guest profiles are implemented as | 63 // The distinction is needed because guest profiles are implemented as |
59 // incognito profiles. | 64 // incognito profiles. |
60 bool IsRegularOrGuestSession(Browser* browser); | 65 bool IsRegularOrGuestSession(Browser* browser); |
61 | 66 |
| 67 // If the lock-enabled information for this profile is not up to date, starts |
| 68 // an update for the Gaia profile info. |
| 69 void UpdateIsProfileLockEnabledIfNeeded(Profile* profile); |
| 70 |
62 // If the --google-profile-info flag is turned on, starts an update for a new | 71 // If the --google-profile-info flag is turned on, starts an update for a new |
63 // version of the Gaia profile picture. | 72 // version of the Gaia profile picture and other profile info. |
64 void UpdateGaiaProfilePhotoIfNeeded(Profile* profile); | 73 void UpdateGaiaProfileInfoIfNeeded(Profile* profile); |
65 | 74 |
66 // Returns the sign-in error controller for the given profile. Some profiles, | 75 // Returns the sign-in error controller for the given profile. Some profiles, |
67 // like guest profiles, may not have a controller so this function may return | 76 // like guest profiles, may not have a controller so this function may return |
68 // NULL. | 77 // NULL. |
69 SigninErrorController* GetSigninErrorController(Profile* profile); | 78 SigninErrorController* GetSigninErrorController(Profile* profile); |
70 | 79 |
71 } // namespace profiles | 80 } // namespace profiles |
72 | 81 |
73 #endif // CHROME_BROWSER_PROFILES_PROFILES_STATE_H_ | 82 #endif // CHROME_BROWSER_PROFILES_PROFILES_STATE_H_ |
OLD | NEW |