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

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

Issue 2593133002: Revert of 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
« no previous file with comments | « components/signin/core/account_id/account_id.cc ('k') | components/user_manager/known_user.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
11 #include "components/user_manager/user_manager_export.h" 11 #include "components/user_manager/user_manager_export.h"
12 12
13 class AccountId; 13 class AccountId;
14 enum class AccountType;
15 class PrefRegistrySimple; 14 class PrefRegistrySimple;
16 15
17 namespace base { 16 namespace base {
18 class DictionaryValue; 17 class DictionaryValue;
19 } 18 }
20 19
21 namespace user_manager { 20 namespace user_manager {
22 namespace known_user { 21 namespace known_user {
23 // Methods for storage/retrieval of per-user properties in Local State. 22 // Methods for storage/retrieval of per-user properties in Local State.
24 23
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 const std::string& path, 67 const std::string& path,
69 const int in_value); 68 const int in_value);
70 69
71 // Returns the list of known AccountIds. 70 // Returns the list of known AccountIds.
72 std::vector<AccountId> USER_MANAGER_EXPORT GetKnownAccountIds(); 71 std::vector<AccountId> USER_MANAGER_EXPORT GetKnownAccountIds();
73 72
74 // 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)
75 // gaia_id. 74 // gaia_id.
76 // This is a temporary call while migrating to AccountId. 75 // This is a temporary call while migrating to AccountId.
77 AccountId USER_MANAGER_EXPORT GetAccountId(const std::string& user_email, 76 AccountId USER_MANAGER_EXPORT GetAccountId(const std::string& user_email,
78 const std::string& id, 77 const std::string& gaia_id);
79 const AccountType& account_type);
80 78
81 // Returns true if |subsystem| data was migrated to GaiaId for the |account_id|. 79 // Returns true if |subsystem| data was migrated to GaiaId for the |account_id|.
82 bool USER_MANAGER_EXPORT GetGaiaIdMigrationStatus(const AccountId& account_id, 80 bool USER_MANAGER_EXPORT GetGaiaIdMigrationStatus(const AccountId& account_id,
83 const std::string& subsystem); 81 const std::string& subsystem);
84 82
85 // Marks |subsystem| migrated to GaiaId for the |account_id|. 83 // Marks |subsystem| migrated to GaiaId for the |account_id|.
86 void USER_MANAGER_EXPORT 84 void USER_MANAGER_EXPORT
87 SetGaiaIdMigrationStatusDone(const AccountId& account_id, 85 SetGaiaIdMigrationStatusDone(const AccountId& account_id,
88 const std::string& subsystem); 86 const std::string& subsystem);
89 87
90 // Updates |gaia_id| for user with |account_id|. 88 // Updates |gaia_id| for user with |account_id|.
91 // TODO(alemate): Update this once AccountId contains GAIA ID 89 // TODO(alemate): Update this once AccountId contains GAIA ID
92 // (crbug.com/548926). 90 // (crbug.com/548926).
93 void USER_MANAGER_EXPORT UpdateGaiaID(const AccountId& account_id, 91 void USER_MANAGER_EXPORT UpdateGaiaID(const AccountId& account_id,
94 const std::string& gaia_id); 92 const std::string& gaia_id);
95 93
96 // Updates |account_id.account_type_| and |account_id.GetGaiaId()| or
97 // |account_id.GetObjGuid()| for user with |account_id|.
98 void USER_MANAGER_EXPORT UpdateId(const AccountId& account_id);
99
100 // Find GAIA ID for user with |account_id|, fill in |out_value| and return 94 // Find GAIA ID for user with |account_id|, fill in |out_value| and return
101 // true 95 // true
102 // if GAIA ID was found or false otherwise. 96 // if GAIA ID was found or false otherwise.
103 // TODO(antrim): Update this once AccountId contains GAIA ID 97 // TODO(antrim): Update this once AccountId contains GAIA ID
104 // (crbug.com/548926). 98 // (crbug.com/548926).
105 bool USER_MANAGER_EXPORT FindGaiaID(const AccountId& account_id, 99 bool USER_MANAGER_EXPORT FindGaiaID(const AccountId& account_id,
106 std::string* out_value); 100 std::string* out_value);
107 101
108 // Setter and getter for DeviceId known user string preference. 102 // Setter and getter for DeviceId known user string preference.
109 void USER_MANAGER_EXPORT SetDeviceId(const AccountId& account_id, 103 void USER_MANAGER_EXPORT SetDeviceId(const AccountId& account_id,
(...skipping 30 matching lines...) Expand all
140 // Removes all user preferences associated with |account_id|. 134 // Removes all user preferences associated with |account_id|.
141 // (This one used by user_manager only and thus not exported.) 135 // (This one used by user_manager only and thus not exported.)
142 void RemovePrefs(const AccountId& account_id); 136 void RemovePrefs(const AccountId& account_id);
143 137
144 // Register known user prefs. 138 // Register known user prefs.
145 void USER_MANAGER_EXPORT RegisterPrefs(PrefRegistrySimple* registry); 139 void USER_MANAGER_EXPORT RegisterPrefs(PrefRegistrySimple* registry);
146 } 140 }
147 } // namespace user_manager 141 } // namespace user_manager
148 142
149 #endif // COMPONENTS_USER_MANAGER_KNOWN_USER_H_ 143 #endif // COMPONENTS_USER_MANAGER_KNOWN_USER_H_
OLDNEW
« no previous file with comments | « components/signin/core/account_id/account_id.cc ('k') | components/user_manager/known_user.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698