Index: chrome/browser/extensions/api/sync_file_system/sync_file_system_api_helpers.cc |
diff --git a/chrome/browser/extensions/api/sync_file_system/sync_file_system_api_helpers.cc b/chrome/browser/extensions/api/sync_file_system/sync_file_system_api_helpers.cc |
index 6cfbf8a18624f63dac91d052c1e69ffe49797346..c191b3d18a96a86eda90b25b611d32034b43009c 100644 |
--- a/chrome/browser/extensions/api/sync_file_system/sync_file_system_api_helpers.cc |
+++ b/chrome/browser/extensions/api/sync_file_system/sync_file_system_api_helpers.cc |
@@ -5,6 +5,8 @@ |
#include "chrome/browser/extensions/api/sync_file_system/sync_file_system_api_helpers.h" |
#include "base/logging.h" |
+#include "base/memory/ptr_util.h" |
+#include "base/values.h" |
#include "storage/browser/fileapi/file_system_url.h" |
#include "storage/common/fileapi/file_system_util.h" |
@@ -105,11 +107,11 @@ ConflictResolutionPolicyToExtensionEnum( |
return api::sync_file_system::CONFLICT_RESOLUTION_POLICY_NONE; |
} |
-base::DictionaryValue* CreateDictionaryValueForFileSystemEntry( |
+std::unique_ptr<base::DictionaryValue> CreateDictionaryValueForFileSystemEntry( |
const storage::FileSystemURL& url, |
sync_file_system::SyncFileType file_type) { |
if (!url.is_valid() || file_type == sync_file_system::SYNC_FILE_TYPE_UNKNOWN) |
- return NULL; |
+ return nullptr; |
std::string file_path = |
base::FilePath(storage::VirtualPath::GetNormalizedFilePath(url.path())) |
@@ -122,7 +124,7 @@ base::DictionaryValue* CreateDictionaryValueForFileSystemEntry( |
root_url.append("/"); |
} |
- base::DictionaryValue* dict = new base::DictionaryValue; |
+ auto dict = base::MakeUnique<base::DictionaryValue>(); |
dict->SetString("fileSystemType", |
storage::GetFileSystemTypeString(url.mount_type())); |
dict->SetString("fileSystemName", |