Chromium Code Reviews| 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..6ffe2123f56227933bfc501cd2275ae6fc276b91 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,7 @@ |
| #include "chrome/browser/extensions/api/sync_file_system/sync_file_system_api_helpers.h" |
| #include "base/logging.h" |
| +#include "base/memory/ptr_util.h" |
|
jdoerrie
2017/04/06 14:25:50
#include "base/values.h"
vabr (Chromium)
2017/04/07 20:40:40
Done.
|
| #include "storage/browser/fileapi/file_system_url.h" |
| #include "storage/common/fileapi/file_system_util.h" |
| @@ -105,11 +106,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 +123,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", |