Removed the owner cache special handling from UserCrosSettingsProvider.

Instead we simply never save this down to the policy blob.

BUG=chromium-os:14054
TEST=Existing tests should still pass.

Review URL: http://codereview.chromium.org/8168010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111157 0039d316-1c4b-4281-b951-d872f2087c98
parent f8b2ca35
......@@ -372,6 +372,8 @@ void StorePropertyOp::SetInPolicy(const std::string& prop,
if ((*i)->GetAsString(&email))
whitelist_proto->add_user_whitelist(email.c_str());
}
} else if (prop == kDeviceOwner) {
// We don't serialize this one to the policy blob.
} else {
NOTREACHED();
}
......
......@@ -802,7 +802,9 @@ void UserManager::UpdateOwnership(bool is_owner) {
content::NotificationService::NoDetails());
if (is_owner) {
// Also update cached value.
UserCrosSettingsProvider::UpdateCachedOwner(logged_in_user().email());
CrosSettings::Get()->SetString(
kDeviceOwner,
g_user_manager.Get().logged_in_user().email());
}
}
......
......@@ -533,10 +533,4 @@ bool UserCrosSettingsProvider::HandlesSetting(const std::string& path) const {
path == kReleaseChannel;
}
// static
void UserCrosSettingsProvider::UpdateCachedOwner(const std::string& email) {
base::StringValue email_value(email);
UpdateCache(kDeviceOwner, &email_value, USE_VALUE_SUPPLIED);
}
} // namespace chromeos
......@@ -41,9 +41,6 @@ class UserCrosSettingsProvider : public CrosSettingsProvider {
const base::Closure& callback) const OVERRIDE;
virtual bool HandlesSetting(const std::string& path) const OVERRIDE;
// Updates cached value of the owner.
static void UpdateCachedOwner(const std::string& email);
private:
// CrosSettingsProvider implementation.
virtual void DoSet(const std::string& path,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment