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

Unified Diff: apps/saved_files_service.cc

Issue 2402003003: Replace deprecated version of SetWithoutPathExpansion (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/saved_files_service.cc
diff --git a/apps/saved_files_service.cc b/apps/saved_files_service.cc
index 4f093e72111afb64de52f5f617f262caac8c6a40..8865e5cc293ba82d128c30430699a39895bc548a 100644
--- a/apps/saved_files_service.cc
+++ b/apps/saved_files_service.cc
@@ -65,12 +65,14 @@ void AddSavedFileEntry(ExtensionPrefs* prefs,
file_entries = update.Create();
DCHECK(!file_entries->GetDictionaryWithoutPathExpansion(file_entry.id, NULL));
- base::DictionaryValue* file_entry_dict = new base::DictionaryValue();
+ std::unique_ptr<base::DictionaryValue> file_entry_dict =
+ base::MakeUnique<base::DictionaryValue>();
file_entry_dict->Set(kFileEntryPath, CreateFilePathValue(file_entry.path));
file_entry_dict->SetBoolean(kFileEntryIsDirectory, file_entry.is_directory);
file_entry_dict->SetInteger(kFileEntrySequenceNumber,
file_entry.sequence_number);
- file_entries->SetWithoutPathExpansion(file_entry.id, file_entry_dict);
+ file_entries->SetWithoutPathExpansion(file_entry.id,
+ std::move(file_entry_dict));
}
// Updates the sequence_number of a SavedFileEntry persisted in ExtensionPrefs.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698