Index: chrome/browser/supervised_user/supervised_user_pref_mapping_service.cc |
diff --git a/chrome/browser/managed_mode/supervised_user_pref_mapping_service.cc b/chrome/browser/supervised_user/supervised_user_pref_mapping_service.cc |
similarity index 76% |
rename from chrome/browser/managed_mode/supervised_user_pref_mapping_service.cc |
rename to chrome/browser/supervised_user/supervised_user_pref_mapping_service.cc |
index dce816560bcc41ff4e45c339cd82511f9528f920..7c2432c4b101677cbd746e87d636fb32749da6cc 100644 |
--- a/chrome/browser/managed_mode/supervised_user_pref_mapping_service.cc |
+++ b/chrome/browser/supervised_user/supervised_user_pref_mapping_service.cc |
@@ -2,23 +2,23 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "chrome/browser/managed_mode/supervised_user_pref_mapping_service.h" |
+#include "chrome/browser/supervised_user/supervised_user_pref_mapping_service.h" |
#include "base/bind.h" |
#include "base/prefs/pref_service.h" |
#include "base/values.h" |
-#include "chrome/browser/managed_mode/managed_user_constants.h" |
-#include "chrome/browser/managed_mode/managed_user_shared_settings_service.h" |
+#include "chrome/browser/supervised_user/supervised_user_constants.h" |
+#include "chrome/browser/supervised_user/supervised_user_shared_settings_service.h" |
#include "chrome/common/pref_names.h" |
const int kNoAvatar = -1; |
SupervisedUserPrefMappingService::SupervisedUserPrefMappingService( |
PrefService* prefs, |
- ManagedUserSharedSettingsService* shared_settings) |
+ SupervisedUserSharedSettingsService* shared_settings) |
: prefs_(prefs), |
shared_settings_(shared_settings), |
- managed_user_id_(prefs->GetString(prefs::kSupervisedUserId)), |
+ supervised_user_id_(prefs->GetString(prefs::kSupervisedUserId)), |
weak_ptr_factory_(this) {} |
SupervisedUserPrefMappingService::~SupervisedUserPrefMappingService() {} |
@@ -39,7 +39,8 @@ void SupervisedUserPrefMappingService::Init() { |
if (GetChromeAvatarIndex() == kNoAvatar) |
OnAvatarChanged(); |
else |
- OnSharedSettingChanged(managed_user_id_, managed_users::kChromeAvatarIndex); |
+ OnSharedSettingChanged(supervised_user_id_, |
+ supervised_users::kChromeAvatarIndex); |
Pam (message me for reviews)
2014/06/16 23:51:51
Now that this is multiple lines, the style guide m
|
} |
void SupervisedUserPrefMappingService::OnAvatarChanged() { |
@@ -52,16 +53,16 @@ void SupervisedUserPrefMappingService::OnAvatarChanged() { |
return; |
// If yes, update the shared settings value. |
- shared_settings_->SetValue(managed_user_id_, |
- managed_users::kChromeAvatarIndex, |
+ shared_settings_->SetValue(supervised_user_id_, |
+ supervised_users::kChromeAvatarIndex, |
base::FundamentalValue(new_avatar_index)); |
} |
void SupervisedUserPrefMappingService::OnSharedSettingChanged( |
const std::string& mu_id, |
const std::string& key) { |
- DCHECK_EQ(mu_id, managed_user_id_); |
- if (key != managed_users::kChromeAvatarIndex) |
+ DCHECK_EQ(mu_id, supervised_user_id_); |
+ if (key != supervised_users::kChromeAvatarIndex) |
return; |
const base::Value* value = shared_settings_->GetValue(mu_id, key); |
@@ -77,7 +78,7 @@ void SupervisedUserPrefMappingService::Shutdown() { |
int SupervisedUserPrefMappingService::GetChromeAvatarIndex() { |
const base::Value* value = shared_settings_->GetValue( |
- managed_user_id_, managed_users::kChromeAvatarIndex); |
+ supervised_user_id_, supervised_users::kChromeAvatarIndex); |
if (!value) |
return kNoAvatar; |