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

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

Issue 105823009: Revert 239280 "Move more file_util functions to base namespace." (Closed) Base URL: svn://svn.chromium.org/chrome/
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: trunk/src/chrome/browser/extensions/extension_creator.cc
===================================================================
--- trunk/src/chrome/browser/extensions/extension_creator.cc (revision 239399)
+++ trunk/src/chrome/browser/extensions/extension_creator.cc (working copy)
@@ -213,7 +213,7 @@
std::vector<uint8>* signature) {
scoped_ptr<crypto::SignatureCreator> signature_creator(
crypto::SignatureCreator::Create(private_key));
- ScopedStdioHandle zip_handle(base::OpenFile(zip_path, "rb"));
+ ScopedStdioHandle zip_handle(file_util::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 @@
const base::FilePath& crx_path) {
if (base::PathExists(crx_path))
base::DeleteFile(crx_path, false);
- ScopedStdioHandle crx_handle(base::OpenFile(crx_path, "wb"));
+ ScopedStdioHandle crx_handle(file_util::OpenFile(crx_path, "wb"));
if (!crx_handle.get()) {
error_message_ = l10n_util::GetStringUTF8(IDS_EXTENSION_SHARING_VIOLATION);
return false;
@@ -273,7 +273,7 @@
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"));
+ ScopedStdioHandle zip_handle(file_util::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()) !=

Powered by Google App Engine
This is Rietveld 408576698