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

Side by Side Diff: components/user_manager/known_user.h

Issue 2529103002: Add account_type into AccountId (Closed)
Patch Set: Created 4 years 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 COMPONENTS_USER_MANAGER_KNOWN_USER_H_ 5 #ifndef COMPONENTS_USER_MANAGER_KNOWN_USER_H_
6 #define COMPONENTS_USER_MANAGER_KNOWN_USER_H_ 6 #define COMPONENTS_USER_MANAGER_KNOWN_USER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 const std::string& path, 67 const std::string& path,
68 const int in_value); 68 const int in_value);
69 69
70 // Returns the list of known AccountIds. 70 // Returns the list of known AccountIds.
71 std::vector<AccountId> USER_MANAGER_EXPORT GetKnownAccountIds(); 71 std::vector<AccountId> USER_MANAGER_EXPORT GetKnownAccountIds();
72 72
73 // This call forms full account id of a known user by email and (optionally) 73 // This call forms full account id of a known user by email and (optionally)
74 // gaia_id. 74 // gaia_id.
75 // This is a temporary call while migrating to AccountId. 75 // This is a temporary call while migrating to AccountId.
76 AccountId USER_MANAGER_EXPORT GetAccountId(const std::string& user_email, 76 AccountId USER_MANAGER_EXPORT GetAccountId(const std::string& user_email,
77 const std::string& gaia_id); 77 const std::string& gaia_id,
78 const std::string& account_type);
78 79
79 // Returns true if |subsystem| data was migrated to GaiaId for the |account_id|. 80 // Returns true if |subsystem| data was migrated to GaiaId for the |account_id|.
80 bool USER_MANAGER_EXPORT GetGaiaIdMigrationStatus(const AccountId& account_id, 81 bool USER_MANAGER_EXPORT GetGaiaIdMigrationStatus(const AccountId& account_id,
81 const std::string& subsystem); 82 const std::string& subsystem);
82 83
83 // Marks |subsystem| migrated to GaiaId for the |account_id|. 84 // Marks |subsystem| migrated to GaiaId for the |account_id|.
84 void USER_MANAGER_EXPORT 85 void USER_MANAGER_EXPORT
85 SetGaiaIdMigrationStatusDone(const AccountId& account_id, 86 SetGaiaIdMigrationStatusDone(const AccountId& account_id,
86 const std::string& subsystem); 87 const std::string& subsystem);
87 88
88 // Updates |gaia_id| for user with |account_id|. 89 // Updates |gaia_id| for user with |account_id|.
89 // TODO(alemate): Update this once AccountId contains GAIA ID 90 // TODO(alemate): Update this once AccountId contains GAIA ID
90 // (crbug.com/548926). 91 // (crbug.com/548926).
91 void USER_MANAGER_EXPORT UpdateGaiaID(const AccountId& account_id, 92 void USER_MANAGER_EXPORT UpdateGaiaID(const AccountId& account_id,
92 const std::string& gaia_id); 93 const std::string& gaia_id);
93 94
95 // Updates |account_id.account_type_| for user with |account_id|.
96 void USER_MANAGER_EXPORT UpdateAccountType(const AccountId& account_id);
97
94 // Find GAIA ID for user with |account_id|, fill in |out_value| and return 98 // Find GAIA ID for user with |account_id|, fill in |out_value| and return
95 // true 99 // true
96 // if GAIA ID was found or false otherwise. 100 // if GAIA ID was found or false otherwise.
97 // TODO(antrim): Update this once AccountId contains GAIA ID 101 // TODO(antrim): Update this once AccountId contains GAIA ID
98 // (crbug.com/548926). 102 // (crbug.com/548926).
99 bool USER_MANAGER_EXPORT FindGaiaID(const AccountId& account_id, 103 bool USER_MANAGER_EXPORT FindGaiaID(const AccountId& account_id,
100 std::string* out_value); 104 std::string* out_value);
101 105
102 // Setter and getter for DeviceId known user string preference. 106 // Setter and getter for DeviceId known user string preference.
103 void USER_MANAGER_EXPORT SetDeviceId(const AccountId& account_id, 107 void USER_MANAGER_EXPORT SetDeviceId(const AccountId& account_id,
(...skipping 30 matching lines...) Expand all
134 // Removes all user preferences associated with |account_id|. 138 // Removes all user preferences associated with |account_id|.
135 // (This one used by user_manager only and thus not exported.) 139 // (This one used by user_manager only and thus not exported.)
136 void RemovePrefs(const AccountId& account_id); 140 void RemovePrefs(const AccountId& account_id);
137 141
138 // Register known user prefs. 142 // Register known user prefs.
139 void USER_MANAGER_EXPORT RegisterPrefs(PrefRegistrySimple* registry); 143 void USER_MANAGER_EXPORT RegisterPrefs(PrefRegistrySimple* registry);
140 } 144 }
141 } // namespace user_manager 145 } // namespace user_manager
142 146
143 #endif // COMPONENTS_USER_MANAGER_KNOWN_USER_H_ 147 #endif // COMPONENTS_USER_MANAGER_KNOWN_USER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698