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

Unified Diff: components/user_manager/user_manager_base.cc

Issue 2843813002: Remove SetWithoutPathExpansion (Closed)
Patch Set: Fix CrOS Error Created 3 years, 8 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
« no previous file with comments | « components/url_matcher/url_matcher_factory_unittest.cc ('k') | components/wifi/wifi_service_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/user_manager/user_manager_base.cc
diff --git a/components/user_manager/user_manager_base.cc b/components/user_manager/user_manager_base.cc
index 00d6b5bf0c94f10d3f808f94bb219ba0d54f9c87..db4ac7aeb6f1662c2a537620949769a8ffa6685f 100644
--- a/components/user_manager/user_manager_base.cc
+++ b/components/user_manager/user_manager_base.cc
@@ -374,9 +374,8 @@ void UserManagerBase::SaveUserOAuthStatus(
{
DictionaryPrefUpdate oauth_status_update(GetLocalState(),
kUserOAuthTokenStatus);
- oauth_status_update->SetWithoutPathExpansion(
- account_id.GetUserEmail(),
- new base::Value(static_cast<int>(oauth_token_status)));
+ oauth_status_update->SetIntegerWithoutPathExpansion(
+ account_id.GetUserEmail(), static_cast<int>(oauth_token_status));
}
GetLocalState()->CommitPendingWrite();
}
@@ -411,8 +410,8 @@ void UserManagerBase::SaveUserDisplayName(const AccountId& account_id,
if (!IsUserNonCryptohomeDataEphemeral(account_id)) {
DictionaryPrefUpdate display_name_update(GetLocalState(),
kUserDisplayName);
- display_name_update->SetWithoutPathExpansion(
- account_id.GetUserEmail(), new base::Value(display_name));
+ display_name_update->SetStringWithoutPathExpansion(
+ account_id.GetUserEmail(), display_name);
}
}
}
@@ -441,8 +440,8 @@ void UserManagerBase::SaveUserDisplayEmail(const AccountId& account_id,
return;
DictionaryPrefUpdate display_email_update(GetLocalState(), kUserDisplayEmail);
- display_email_update->SetWithoutPathExpansion(account_id.GetUserEmail(),
- new base::Value(display_email));
+ display_email_update->SetStringWithoutPathExpansion(account_id.GetUserEmail(),
+ display_email);
}
std::string UserManagerBase::GetUserDisplayEmail(
@@ -467,8 +466,8 @@ void UserManagerBase::SaveUserType(const AccountId& account_id,
return;
DictionaryPrefUpdate user_type_update(GetLocalState(), kUserType);
- user_type_update->SetWithoutPathExpansion(
- account_id.GetUserEmail(), new base::Value(static_cast<int>(user_type)));
+ user_type_update->SetIntegerWithoutPathExpansion(account_id.GetUserEmail(),
+ static_cast<int>(user_type));
GetLocalState()->CommitPendingWrite();
}
@@ -484,8 +483,8 @@ void UserManagerBase::UpdateUserAccountData(
user->set_given_name(given_name);
if (!IsUserNonCryptohomeDataEphemeral(account_id)) {
DictionaryPrefUpdate given_name_update(GetLocalState(), kUserGivenName);
- given_name_update->SetWithoutPathExpansion(account_id.GetUserEmail(),
- new base::Value(given_name));
+ given_name_update->SetStringWithoutPathExpansion(
+ account_id.GetUserEmail(), given_name);
}
}
« no previous file with comments | « components/url_matcher/url_matcher_factory_unittest.cc ('k') | components/wifi/wifi_service_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698