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

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

Issue 184563006: Move WriteFile and WriteFileDescriptor from file_util to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months 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/sandboxed_unpacker.cc
diff --git a/chrome/browser/extensions/sandboxed_unpacker.cc b/chrome/browser/extensions/sandboxed_unpacker.cc
index f7625e70f468a9159249e1e6af1edb82f5891193..618cb36c0f4b2565d425dd814118074020d3ab1f 100644
--- a/chrome/browser/extensions/sandboxed_unpacker.cc
+++ b/chrome/browser/extensions/sandboxed_unpacker.cc
@@ -132,7 +132,7 @@ bool VerifyJunctionFreeLocation(base::FilePath* temp_dir) {
// NormalizeFilePath requires a non-empty file, so write some data.
// If you change the exit points of this function please make sure all
// exit points delete this temp file!
- if (file_util::WriteFile(temp_file, ".", 1) != 1)
+ if (base::WriteFile(temp_file, ".", 1) != 1)
return false;
base::FilePath normalized_temp_file;
@@ -629,7 +629,7 @@ base::DictionaryValue* SandboxedUnpacker::RewriteManifestFile(
base::FilePath manifest_path =
extension_root_.Append(kManifestFilename);
int size = base::checked_cast<int>(manifest_json.size());
- if (file_util::WriteFile(manifest_path, manifest_json.data(), size) != size) {
+ if (base::WriteFile(manifest_path, manifest_json.data(), size) != size) {
// Error saving manifest.json.
ReportFailure(
ERROR_SAVING_MANIFEST_JSON,
@@ -742,7 +742,7 @@ bool SandboxedUnpacker::RewriteImageFiles(SkBitmap* install_icon) {
// so we can be sure the directory exists.
const char* image_data_ptr = reinterpret_cast<const char*>(&image_data[0]);
int size = base::checked_cast<int>(image_data.size());
- if (file_util::WriteFile(path, image_data_ptr, size) != size) {
+ if (base::WriteFile(path, image_data_ptr, size) != size) {
// Error saving theme image.
ReportFailure(
ERROR_SAVING_THEME_IMAGE,
@@ -811,7 +811,7 @@ bool SandboxedUnpacker::RewriteCatalogFiles() {
// Note: we're overwriting existing files that the utility process read,
// so we can be sure the directory exists.
int size = base::checked_cast<int>(catalog_json.size());
- if (file_util::WriteFile(path, catalog_json.c_str(), size) != size) {
+ if (base::WriteFile(path, catalog_json.c_str(), size) != size) {
// Error saving catalog.
ReportFailure(
ERROR_SAVING_CATALOG,
« no previous file with comments | « chrome/browser/extensions/extension_service_unittest.cc ('k') | chrome/browser/extensions/test_extension_dir.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698