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

Unified Diff: chrome/browser/supervised_user/supervised_user_settings_service.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
Index: chrome/browser/supervised_user/supervised_user_settings_service.cc
diff --git a/chrome/browser/supervised_user/supervised_user_settings_service.cc b/chrome/browser/supervised_user/supervised_user_settings_service.cc
index 46a7f462ee05a766b6329a9e72d61e613e90de86..15f680da667c4ba9b3ea4d5eff14d9d3e2f42ef0 100644
--- a/chrome/browser/supervised_user/supervised_user_settings_service.cc
+++ b/chrome/browser/supervised_user/supervised_user_settings_service.cc
@@ -173,7 +173,7 @@ void SupervisedUserSettingsService::SetLocalSetting(
const std::string& key,
std::unique_ptr<base::Value> value) {
if (value)
- local_settings_->SetWithoutPathExpansion(key, value.release());
+ local_settings_->SetWithoutPathExpansion(key, std::move(value));
else
local_settings_->RemoveWithoutPathExpansion(key, nullptr);
@@ -252,7 +252,7 @@ SyncMergeResult SupervisedUserSettingsService::MergeDataAndStartSyncing(
std::string name_suffix = supervised_user_setting.name();
std::string name_key = name_suffix;
base::DictionaryValue* dict = GetDictionaryAndSplitKey(&name_suffix);
- dict->SetWithoutPathExpansion(name_suffix, value.release());
+ dict->SetWithoutPathExpansion(name_suffix, std::move(value));
if (seen_keys.find(name_key) == seen_keys.end()) {
added_sync_keys.insert(name_key);
num_added++;
@@ -282,7 +282,7 @@ SyncMergeResult SupervisedUserSettingsService::MergeDataAndStartSyncing(
dict->HasKey(key_suffix) ? SyncChange::ACTION_UPDATE
: SyncChange::ACTION_ADD;
change_list.push_back(SyncChange(FROM_HERE, change_type, data));
- dict->SetWithoutPathExpansion(key_suffix, it.value().DeepCopy());
+ dict->SetWithoutPathExpansion(key_suffix, it.value().CreateDeepCopy());
if (added_sync_keys.find(name_key) != added_sync_keys.end()) {
num_added--;
}
@@ -372,7 +372,7 @@ SyncError SupervisedUserSettingsService::ProcessSyncChanges(
DLOG_IF(WARNING, change_type == SyncChange::ACTION_UPDATE)
<< "Value for key " << key << " doesn't exist yet";
}
- dict->SetWithoutPathExpansion(key, value.release());
+ dict->SetWithoutPathExpansion(key, std::move(value));
break;
}
case SyncChange::ACTION_DELETE: {

Powered by Google App Engine
This is Rietveld 408576698