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

Unified Diff: chrome/browser/extensions/extension_creator.cc

Issue 109043002: Move more file_util functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
Index: chrome/browser/extensions/extension_creator.cc
diff --git a/chrome/browser/extensions/extension_creator.cc b/chrome/browser/extensions/extension_creator.cc
index be9ac61f7e62eb1c6c678249caf6e9dd4f601459..c31a399197b9b4113dfc1443bcf03f5cbd062680 100644
--- a/chrome/browser/extensions/extension_creator.cc
+++ b/chrome/browser/extensions/extension_creator.cc
@@ -213,7 +213,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(file_util::OpenFile(zip_path, "rb"));
+ ScopedStdioHandle 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;
@@ -241,7 +241,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(file_util::OpenFile(crx_path, "wb"));
+ ScopedStdioHandle crx_handle(base::OpenFile(crx_path, "wb"));
if (!crx_handle.get()) {
error_message_ = l10n_util::GetStringUTF8(IDS_EXTENSION_SHARING_VIOLATION);
return false;
@@ -273,7 +273,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(file_util::OpenFile(zip_path, "rb"));
+ ScopedStdioHandle 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()) !=
« no previous file with comments | « chrome/browser/component_updater/component_unpacker.cc ('k') | chrome/browser/extensions/external_registry_loader_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698