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

Unified Diff: components/policy/core/common/cloud/component_cloud_policy_store.h

Issue 1165323004: We should use UserID object to identify users instead of username. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months 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 side-by-side diff with in-line comments
Download patch
Index: components/policy/core/common/cloud/component_cloud_policy_store.h
diff --git a/components/policy/core/common/cloud/component_cloud_policy_store.h b/components/policy/core/common/cloud/component_cloud_policy_store.h
index 8b9cf8c436ddce73dea89d9c059594804e744982..08bada9d3097a037c62c74f87de35523ff193020 100644
--- a/components/policy/core/common/cloud/component_cloud_policy_store.h
+++ b/components/policy/core/common/cloud/component_cloud_policy_store.h
@@ -15,6 +15,7 @@
#include "components/policy/core/common/policy_bundle.h"
#include "components/policy/core/common/policy_namespace.h"
#include "components/policy/policy_export.h"
+#include "components/user_manager/user_id.h"
namespace enterprise_management {
class ExternalPolicyData;
@@ -64,10 +65,10 @@ class POLICY_EXPORT ComponentCloudPolicyStore : public base::NonThreadSafe {
// cached.
const std::string& GetCachedHash(const PolicyNamespace& ns) const;
- // |username| and |dm_token| are used to validate the cached data, and data
+ // |user_id| and |dm_token| are used to validate the cached data, and data
// stored later.
// All ValidatePolicy() requests without credentials fail.
- void SetCredentials(const std::string& username,
+ void SetCredentials(const user_manager::UserID& user_id,
const std::string& dm_token);
// Loads and validates all the currently cached protobufs and policy data.
@@ -131,7 +132,7 @@ class POLICY_EXPORT ComponentCloudPolicyStore : public base::NonThreadSafe {
Delegate* delegate_;
ResourceCache* cache_;
- std::string username_;
+ user_manager::UserID user_id_;
std::string dm_token_;
PolicyBundle policy_bundle_;

Powered by Google App Engine
This is Rietveld 408576698