Chromium Code Reviews| Index: chrome/utility/chrome_content_utility_client.cc |
| diff --git a/chrome/utility/chrome_content_utility_client.cc b/chrome/utility/chrome_content_utility_client.cc |
| index a813cef5d3e35573a7c5e9fa26b08f5222105a9b..2f5a04781399678c1400d32e335c588a44fd3619 100644 |
| --- a/chrome/utility/chrome_content_utility_client.cc |
| +++ b/chrome/utility/chrome_content_utility_client.cc |
| @@ -249,6 +249,7 @@ void ChromeContentUtilityClient::OnCreateZipFile( |
| const base::FilePath& src_dir, |
| const std::vector<base::FilePath>& src_relative_paths, |
| const base::FileDescriptor& dest_fd) { |
| + base::File dest_file(dest_fd); |
|
satorux1
2014/11/12 07:04:43
This is needed to close the file descriptor, right
jeremyspiegel
2014/11/12 08:52:51
Yes thanks, that is what I was looking for.
|
| bool succeeded = true; |
| // Check sanity of source relative paths. Reject if path is absolute or |
| @@ -263,7 +264,8 @@ void ChromeContentUtilityClient::OnCreateZipFile( |
| } |
| if (succeeded) |
| - succeeded = zip::ZipFiles(src_dir, src_relative_paths, dest_fd.fd); |
| + succeeded = zip::ZipFiles( |
| + src_dir, src_relative_paths, dest_file.GetPlatformFile()); |
| if (succeeded) |
| Send(new ChromeUtilityHostMsg_CreateZipFile_Succeeded()); |