| Index: chrome/browser/extensions/extension_creator.cc
|
| diff --git a/chrome/browser/extensions/extension_creator.cc b/chrome/browser/extensions/extension_creator.cc
|
| index 175398c6a0f7e196e7a4a02655e521a27b5fb0c8..ca9185122e466a248f04b12c28fd8dee879f79cb 100644
|
| --- a/chrome/browser/extensions/extension_creator.cc
|
| +++ b/chrome/browser/extensions/extension_creator.cc
|
| @@ -10,8 +10,8 @@
|
| #include "base/bind.h"
|
| #include "base/callback.h"
|
| #include "base/file_util.h"
|
| +#include "base/files/scoped_file.h"
|
| #include "base/files/scoped_temp_dir.h"
|
| -#include "base/memory/scoped_handle.h"
|
| #include "base/strings/string_util.h"
|
| #include "chrome/browser/extensions/extension_creator_filter.h"
|
| #include "crypto/rsa_private_key.h"
|
| @@ -212,7 +212,7 @@ bool ExtensionCreator::SignZip(const base::FilePath& zip_path,
|
| std::vector<uint8>* signature) {
|
| scoped_ptr<crypto::SignatureCreator> signature_creator(
|
| crypto::SignatureCreator::Create(private_key));
|
| - ScopedStdioHandle zip_handle(base::OpenFile(zip_path, "rb"));
|
| + base::ScopedFILE zip_handle(base::OpenFile(zip_path, "rb"));
|
| size_t buffer_size = 1 << 16;
|
| scoped_ptr<uint8[]> buffer(new uint8[buffer_size]);
|
| int bytes_read = -1;
|
| @@ -224,7 +224,7 @@ bool ExtensionCreator::SignZip(const base::FilePath& zip_path,
|
| return false;
|
| }
|
| }
|
| - zip_handle.Close();
|
| + zip_handle.reset();
|
|
|
| if (!signature_creator->Final(signature)) {
|
| error_message_ =
|
| @@ -240,7 +240,7 @@ bool ExtensionCreator::WriteCRX(const base::FilePath& zip_path,
|
| const base::FilePath& crx_path) {
|
| if (base::PathExists(crx_path))
|
| base::DeleteFile(crx_path, false);
|
| - ScopedStdioHandle crx_handle(base::OpenFile(crx_path, "wb"));
|
| + base::ScopedFILE crx_handle(base::OpenFile(crx_path, "wb"));
|
| if (!crx_handle.get()) {
|
| error_message_ = l10n_util::GetStringUTF8(IDS_EXTENSION_SHARING_VIOLATION);
|
| return false;
|
| @@ -272,7 +272,7 @@ bool ExtensionCreator::WriteCRX(const base::FilePath& zip_path,
|
| size_t buffer_size = 1 << 16;
|
| scoped_ptr<uint8[]> buffer(new uint8[buffer_size]);
|
| size_t bytes_read = 0;
|
| - ScopedStdioHandle zip_handle(base::OpenFile(zip_path, "rb"));
|
| + base::ScopedFILE zip_handle(base::OpenFile(zip_path, "rb"));
|
| while ((bytes_read = fread(buffer.get(), 1, buffer_size,
|
| zip_handle.get())) > 0) {
|
| if (fwrite(buffer.get(), sizeof(char), bytes_read, crx_handle.get()) !=
|
|
|