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

Unified Diff: chrome/browser/supervised_user/chromeos/supervised_user_password_service.cc

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/supervised_user/chromeos/supervised_user_password_service.cc
diff --git a/chrome/browser/supervised_user/chromeos/supervised_user_password_service.cc b/chrome/browser/supervised_user/chromeos/supervised_user_password_service.cc
index 530bfab509b598faf1c22aee5d1e100fd31ebc67..50e21d7562796073f2838c8e876b5c425fd172a2 100644
--- a/chrome/browser/supervised_user/chromeos/supervised_user_password_service.cc
+++ b/chrome/browser/supervised_user/chromeos/supervised_user_password_service.cc
@@ -11,16 +11,17 @@
#include "chrome/browser/chromeos/login/users/supervised_user_manager.h"
#include "chrome/browser/supervised_user/legacy/supervised_user_sync_service.h"
#include "chrome/browser/supervised_user/supervised_user_constants.h"
+#include "components/user_manager/user_id.h"
namespace chromeos {
SupervisedUserPasswordService::SupervisedUserPasswordService()
- : weak_ptr_factory_(this) {}
+ : user_id_(std::string(), std::string()), weak_ptr_factory_(this) {}
SupervisedUserPasswordService::~SupervisedUserPasswordService() {}
void SupervisedUserPasswordService::Init(
- const std::string& user_id,
+ const user_manager::UserID& user_id,
SupervisedUserSharedSettingsService* shared_settings_service) {
user_id_ = user_id;
settings_service_ = shared_settings_service;
@@ -49,8 +50,8 @@ void SupervisedUserPasswordService::OnSharedSettingsChange(
LOG(WARNING) << "Got notification for user not on device.";
return;
}
- DCHECK(user_id_ == user->email());
- if (user_id_ != user->email())
+ DCHECK(user_id_ == user->GetUserID());
+ if (user_id_ != user->GetUserID())
return;
const base::Value* value = settings_service_->GetValue(su_id, key);
if (value == NULL) {

Powered by Google App Engine
This is Rietveld 408576698