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

Unified Diff: chrome/browser/chromeos/ownership/owner_settings_service_chromeos.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: chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h
diff --git a/chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h b/chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h
index aea7cc03a24d3c05d5255668372acf487a7aa102..2ecaa2a9d99380349231721250da2f94f2db5b2d 100644
--- a/chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h
+++ b/chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h
@@ -19,6 +19,7 @@
#include "components/ownership/owner_key_util.h"
#include "components/ownership/owner_settings_service.h"
#include "components/policy/core/common/cloud/cloud_policy_constants.h"
+#include "components/user_manager/user_id.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -105,7 +106,7 @@ class OwnerSettingsServiceChromeOS : public ownership::OwnerSettingsService,
// Assembles PolicyData based on |settings|, |policy_data|, |user_id| and
// |pending_management_settings|. Applies local-owner policy fixups if needed.
static scoped_ptr<enterprise_management::PolicyData> AssemblePolicy(
- const std::string& user_id,
+ const user_manager::UserID& user_id,
const enterprise_management::PolicyData* policy_data,
bool apply_pending_mangement_settings,
const ManagementSettings& pending_management_settings,
@@ -130,7 +131,7 @@ class OwnerSettingsServiceChromeOS : public ownership::OwnerSettingsService,
// 1) user whitelisting must be explicitly allowed or disallowed, and
// 2) the owner user must be on the whitelist, if it's enforced.
static void FixupLocalOwnerPolicy(
- const std::string& user_id,
+ const user_manager::UserID& user_id,
enterprise_management::ChromeDeviceSettingsProto* settings);
// OwnerSettingsService protected interface overrides:
@@ -168,7 +169,7 @@ class OwnerSettingsServiceChromeOS : public ownership::OwnerSettingsService,
Profile* profile_;
// User ID this service instance belongs to.
- std::string user_id_;
+ user_manager::UserID user_id_;
// Whether profile still needs to be initialized.
bool waiting_for_profile_creation_;

Powered by Google App Engine
This is Rietveld 408576698