summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-06 20:42:30 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-06 20:42:30 +0000
commite5c2a22eb106e0fef92bbf80ac8bf2429980cc4e (patch)
tree480bf91e3cf64d69f837a2f22f8fc868bf17dfdc /net
parent06b1d42b0ceadd4a70b7462c5c7e6adeb5a18ca4 (diff)
downloadchromium_src-e5c2a22eb106e0fef92bbf80ac8bf2429980cc4e.zip
chromium_src-e5c2a22eb106e0fef92bbf80ac8bf2429980cc4e.tar.gz
chromium_src-e5c2a22eb106e0fef92bbf80ac8bf2429980cc4e.tar.bz2
Move WriteFile and WriteFileDescriptor from file_util to base namespace.
R=viettrungluu@chromium.org TBR=viettrungluu Review URL: https://codereview.chromium.org/184563006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255418 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/base/file_stream_unittest.cc6
-rw-r--r--net/base/upload_data_stream_unittest.cc18
-rw-r--r--net/base/upload_file_element_reader_unittest.cc2
-rw-r--r--net/disk_cache/backend_unittest.cc6
-rw-r--r--net/disk_cache/blockfile/block_files_unittest.cc2
-rw-r--r--net/disk_cache/simple/simple_index_file.cc2
-rw-r--r--net/disk_cache/simple/simple_index_file_unittest.cc13
-rw-r--r--net/disk_cache/simple/simple_version_upgrade_unittest.cc10
-rw-r--r--net/http/http_network_transaction_unittest.cc2
-rw-r--r--net/http/transport_security_persister_unittest.cc3
-rw-r--r--net/proxy/proxy_config_service_linux_unittest.cc8
-rw-r--r--net/spdy/spdy_network_transaction_unittest.cc6
-rw-r--r--net/tools/crl_set_dump/crl_set_dump.cc3
-rw-r--r--net/tools/tld_cleanup/tld_cleanup_util.cc2
-rw-r--r--net/url_request/url_fetcher_impl_unittest.cc2
-rw-r--r--net/url_request/url_request_unittest.cc8
16 files changed, 45 insertions, 48 deletions
diff --git a/net/base/file_stream_unittest.cc b/net/base/file_stream_unittest.cc
index b055c78..d86010d 100644
--- a/net/base/file_stream_unittest.cc
+++ b/net/base/file_stream_unittest.cc
@@ -47,7 +47,7 @@ class FileStreamTest : public PlatformTest {
PlatformTest::SetUp();
base::CreateTemporaryFile(&temp_file_path_);
- file_util::WriteFile(temp_file_path_, kTestData, kTestDataSize);
+ base::WriteFile(temp_file_path_, kTestData, kTestDataSize);
}
virtual void TearDown() {
EXPECT_TRUE(base::DeleteFile(temp_file_path_, false));
@@ -145,7 +145,7 @@ TEST_F(FileStreamTest, AsyncOpenExplicitCloseOrphaned) {
TEST_F(FileStreamTest, FileHandleNotLeftOpen) {
bool created = false;
ASSERT_EQ(kTestDataSize,
- file_util::WriteFile(temp_file_path(), kTestData, kTestDataSize));
+ base::WriteFile(temp_file_path(), kTestData, kTestDataSize));
int flags = base::PLATFORM_FILE_OPEN_ALWAYS | base::PLATFORM_FILE_READ;
base::PlatformFile file = base::CreatePlatformFile(
temp_file_path(), flags, &created, NULL);
@@ -169,7 +169,7 @@ TEST_F(FileStreamTest, UseFileHandle) {
// 1. Test reading with a file handle.
ASSERT_EQ(kTestDataSize,
- file_util::WriteFile(temp_file_path(), kTestData, kTestDataSize));
+ base::WriteFile(temp_file_path(), kTestData, kTestDataSize));
int flags = base::PLATFORM_FILE_OPEN_ALWAYS | base::PLATFORM_FILE_READ;
base::PlatformFile file = base::CreatePlatformFile(
temp_file_path(), flags, &created, NULL);
diff --git a/net/base/upload_data_stream_unittest.cc b/net/base/upload_data_stream_unittest.cc
index fa6c437..90a78d2 100644
--- a/net/base/upload_data_stream_unittest.cc
+++ b/net/base/upload_data_stream_unittest.cc
@@ -174,7 +174,7 @@ TEST_F(UploadDataStreamTest, File) {
ASSERT_TRUE(base::CreateTemporaryFileInDir(temp_dir_.path(),
&temp_file_path));
ASSERT_EQ(static_cast<int>(kTestDataSize),
- file_util::WriteFile(temp_file_path, kTestData, kTestDataSize));
+ base::WriteFile(temp_file_path, kTestData, kTestDataSize));
element_readers_.push_back(
new UploadFileElementReader(base::MessageLoopProxy::current().get(),
@@ -208,7 +208,7 @@ TEST_F(UploadDataStreamTest, FileSmallerThanLength) {
ASSERT_TRUE(base::CreateTemporaryFileInDir(temp_dir_.path(),
&temp_file_path));
ASSERT_EQ(static_cast<int>(kTestDataSize),
- file_util::WriteFile(temp_file_path, kTestData, kTestDataSize));
+ base::WriteFile(temp_file_path, kTestData, kTestDataSize));
const uint64 kFakeSize = kTestDataSize*2;
UploadFileElementReader::ScopedOverridingContentLengthForTests
@@ -326,7 +326,7 @@ TEST_F(UploadDataStreamTest, FileAndBytes) {
ASSERT_TRUE(base::CreateTemporaryFileInDir(temp_dir_.path(),
&temp_file_path));
ASSERT_EQ(static_cast<int>(kTestDataSize),
- file_util::WriteFile(temp_file_path, kTestData, kTestDataSize));
+ base::WriteFile(temp_file_path, kTestData, kTestDataSize));
const uint64 kFileRangeOffset = 1;
const uint64 kFileRangeLength = 4;
@@ -552,7 +552,7 @@ TEST_F(UploadDataStreamTest, FileChanged) {
ASSERT_TRUE(base::CreateTemporaryFileInDir(temp_dir_.path(),
&temp_file_path));
ASSERT_EQ(static_cast<int>(kTestDataSize),
- file_util::WriteFile(temp_file_path, kTestData, kTestDataSize));
+ base::WriteFile(temp_file_path, kTestData, kTestDataSize));
base::File::Info file_info;
ASSERT_TRUE(base::GetFileInfo(temp_file_path, &file_info));
@@ -571,7 +571,7 @@ TEST_F(UploadDataStreamTest, MultipleInit) {
ASSERT_TRUE(base::CreateTemporaryFileInDir(temp_dir_.path(),
&temp_file_path));
ASSERT_EQ(static_cast<int>(kTestDataSize),
- file_util::WriteFile(temp_file_path, kTestData, kTestDataSize));
+ base::WriteFile(temp_file_path, kTestData, kTestDataSize));
// Prepare data.
element_readers_.push_back(new UploadBytesElementReader(
@@ -615,7 +615,7 @@ TEST_F(UploadDataStreamTest, MultipleInitAsync) {
ASSERT_TRUE(base::CreateTemporaryFileInDir(temp_dir_.path(),
&temp_file_path));
ASSERT_EQ(static_cast<int>(kTestDataSize),
- file_util::WriteFile(temp_file_path, kTestData, kTestDataSize));
+ base::WriteFile(temp_file_path, kTestData, kTestDataSize));
TestCompletionCallback test_callback;
// Prepare data.
@@ -658,7 +658,7 @@ TEST_F(UploadDataStreamTest, InitToReset) {
ASSERT_TRUE(base::CreateTemporaryFileInDir(temp_dir_.path(),
&temp_file_path));
ASSERT_EQ(static_cast<int>(kTestDataSize),
- file_util::WriteFile(temp_file_path, kTestData, kTestDataSize));
+ base::WriteFile(temp_file_path, kTestData, kTestDataSize));
// Prepare data.
element_readers_.push_back(new UploadBytesElementReader(
@@ -715,7 +715,7 @@ TEST_F(UploadDataStreamTest, InitDuringAsyncInit) {
ASSERT_TRUE(base::CreateTemporaryFileInDir(temp_dir_.path(),
&temp_file_path));
ASSERT_EQ(static_cast<int>(kTestDataSize),
- file_util::WriteFile(temp_file_path, kTestData, kTestDataSize));
+ base::WriteFile(temp_file_path, kTestData, kTestDataSize));
// Prepare data.
element_readers_.push_back(new UploadBytesElementReader(
@@ -763,7 +763,7 @@ TEST_F(UploadDataStreamTest, InitDuringAsyncRead) {
ASSERT_TRUE(base::CreateTemporaryFileInDir(temp_dir_.path(),
&temp_file_path));
ASSERT_EQ(static_cast<int>(kTestDataSize),
- file_util::WriteFile(temp_file_path, kTestData, kTestDataSize));
+ base::WriteFile(temp_file_path, kTestData, kTestDataSize));
// Prepare data.
element_readers_.push_back(new UploadBytesElementReader(
diff --git a/net/base/upload_file_element_reader_unittest.cc b/net/base/upload_file_element_reader_unittest.cc
index d98262b..395b867 100644
--- a/net/base/upload_file_element_reader_unittest.cc
+++ b/net/base/upload_file_element_reader_unittest.cc
@@ -30,7 +30,7 @@ class UploadFileElementReaderTest : public PlatformTest {
&temp_file_path_));
ASSERT_EQ(
static_cast<int>(bytes_.size()),
- file_util::WriteFile(temp_file_path_, &bytes_[0], bytes_.size()));
+ base::WriteFile(temp_file_path_, &bytes_[0], bytes_.size()));
reader_.reset(
new UploadFileElementReader(base::MessageLoopProxy::current().get(),
diff --git a/net/disk_cache/backend_unittest.cc b/net/disk_cache/backend_unittest.cc
index 35fdebc..68da572 100644
--- a/net/disk_cache/backend_unittest.cc
+++ b/net/disk_cache/backend_unittest.cc
@@ -482,7 +482,7 @@ TEST_F(DiskCacheBackendTest, ExternalFiles) {
const int kSize = 50;
scoped_refptr<net::IOBuffer> buffer1(new net::IOBuffer(kSize));
CacheTestFillBuffer(buffer1->data(), kSize, false);
- ASSERT_EQ(kSize, file_util::WriteFile(filename, buffer1->data(), kSize));
+ ASSERT_EQ(kSize, base::WriteFile(filename, buffer1->data(), kSize));
// Now let's create a file with the cache.
disk_cache::Entry* entry;
@@ -671,7 +671,7 @@ TEST_F(DiskCacheBackendTest, ShutdownWithPendingCreate_Fast) {
TEST_F(DiskCacheTest, TruncatedIndex) {
ASSERT_TRUE(CleanupCacheDir());
base::FilePath index = cache_path_.AppendASCII("index");
- ASSERT_EQ(5, file_util::WriteFile(index, "hello", 5));
+ ASSERT_EQ(5, base::WriteFile(index, "hello", 5));
base::Thread cache_thread("CacheThread");
ASSERT_TRUE(cache_thread.StartWithOptions(
@@ -3317,7 +3317,7 @@ TEST_F(DiskCacheBackendTest, SimpleCacheOpenBadFile) {
header.initial_magic_number = GG_UINT64_C(0xbadf00d);
EXPECT_EQ(
implicit_cast<int>(sizeof(header)),
- file_util::WriteFile(entry_file1_path, reinterpret_cast<char*>(&header),
+ base::WriteFile(entry_file1_path, reinterpret_cast<char*>(&header),
sizeof(header)));
ASSERT_EQ(net::ERR_FAILED, OpenEntry(key, &entry));
}
diff --git a/net/disk_cache/blockfile/block_files_unittest.cc b/net/disk_cache/blockfile/block_files_unittest.cc
index 8e2995d..bbd8981 100644
--- a/net/disk_cache/blockfile/block_files_unittest.cc
+++ b/net/disk_cache/blockfile/block_files_unittest.cc
@@ -270,7 +270,7 @@ TEST_F(DiskCacheTest, BlockFiles_InvalidFile) {
char header[kBlockHeaderSize];
memset(header, 'a', kBlockHeaderSize);
EXPECT_EQ(kBlockHeaderSize,
- file_util::WriteFile(filename, header, kBlockHeaderSize));
+ base::WriteFile(filename, header, kBlockHeaderSize));
EXPECT_TRUE(NULL == files.GetFile(addr));
diff --git a/net/disk_cache/simple/simple_index_file.cc b/net/disk_cache/simple/simple_index_file.cc
index 9e28a12..0b375f4 100644
--- a/net/disk_cache/simple/simple_index_file.cc
+++ b/net/disk_cache/simple/simple_index_file.cc
@@ -66,7 +66,7 @@ void UmaRecordIndexInitMethod(IndexInitMethod method,
}
bool WritePickleFile(Pickle* pickle, const base::FilePath& file_name) {
- int bytes_written = file_util::WriteFile(
+ int bytes_written = base::WriteFile(
file_name, static_cast<const char*>(pickle->data()), pickle->size());
if (bytes_written != implicit_cast<int>(pickle->size())) {
base::DeleteFile(file_name, /* recursive = */ false);
diff --git a/net/disk_cache/simple/simple_index_file_unittest.cc b/net/disk_cache/simple/simple_index_file_unittest.cc
index 3f4b56f..212320b 100644
--- a/net/disk_cache/simple/simple_index_file_unittest.cc
+++ b/net/disk_cache/simple/simple_index_file_unittest.cc
@@ -170,9 +170,8 @@ TEST_F(SimpleIndexFileTest, LegacyIsIndexFileStale) {
WrappedSimpleIndexFile::LegacyIsIndexFileStale(cache_mtime, index_path));
const std::string kDummyData = "nothing to be seen here";
EXPECT_EQ(static_cast<int>(kDummyData.size()),
- file_util::WriteFile(index_path,
- kDummyData.data(),
- kDummyData.size()));
+ base::WriteFile(index_path,
+ kDummyData.data(), kDummyData.size()));
ASSERT_TRUE(simple_util::GetMTime(cache_path, &cache_mtime));
EXPECT_FALSE(
WrappedSimpleIndexFile::LegacyIsIndexFileStale(cache_mtime, index_path));
@@ -244,7 +243,7 @@ TEST_F(SimpleIndexFileTest, LoadCorruptIndex) {
const std::string kDummyData = "nothing to be seen here";
EXPECT_EQ(
implicit_cast<int>(kDummyData.size()),
- file_util::WriteFile(index_path, kDummyData.data(), kDummyData.size()));
+ base::WriteFile(index_path, kDummyData.data(), kDummyData.size()));
base::Time fake_cache_mtime;
ASSERT_TRUE(simple_util::GetMTime(simple_index_file.GetIndexFilePath(),
&fake_cache_mtime));
@@ -287,9 +286,9 @@ TEST_F(SimpleIndexFileTest, SimpleCacheUpgrade) {
const base::FilePath old_index_file =
cache_path.AppendASCII("the-real-index");
ASSERT_EQ(implicit_cast<int>(index_file_contents.size()),
- file_util::WriteFile(old_index_file,
- index_file_contents.data(),
- index_file_contents.size()));
+ base::WriteFile(old_index_file,
+ index_file_contents.data(),
+ index_file_contents.size()));
// Upgrade the cache.
ASSERT_TRUE(disk_cache::UpgradeSimpleCacheOnDisk(cache_path));
diff --git a/net/disk_cache/simple/simple_version_upgrade_unittest.cc b/net/disk_cache/simple/simple_version_upgrade_unittest.cc
index a5493f7..15f4fa1 100644
--- a/net/disk_cache/simple/simple_version_upgrade_unittest.cc
+++ b/net/disk_cache/simple/simple_version_upgrade_unittest.cc
@@ -39,7 +39,7 @@ bool WriteFakeIndexFileV5(const base::FilePath& cache_path) {
data.unused_must_be_zero2 = 0;
const base::FilePath file_name = cache_path.AppendASCII("index");
return sizeof(data) ==
- file_util::WriteFile(
+ base::WriteFile(
file_name, reinterpret_cast<const char*>(&data), sizeof(data));
}
@@ -55,7 +55,7 @@ TEST(SimpleVersionUpgradeTest, FailsToMigrateBackwards) {
data.unused_must_be_zero2 = 0;
const base::FilePath file_name = cache_path.AppendASCII(kFakeIndexFileName);
ASSERT_EQ(implicit_cast<int>(sizeof(data)),
- file_util::WriteFile(
+ base::WriteFile(
file_name, reinterpret_cast<const char*>(&data), sizeof(data)));
EXPECT_FALSE(disk_cache::UpgradeSimpleCacheOnDisk(cache_dir.path()));
}
@@ -69,7 +69,7 @@ TEST(SimpleVersionUpgradeTest, FakeIndexVersionGetsUpdated) {
const std::string file_contents("incorrectly serialized data");
const base::FilePath index_file = cache_path.AppendASCII(kIndexFileName);
ASSERT_EQ(implicit_cast<int>(file_contents.size()),
- file_util::WriteFile(
+ base::WriteFile(
index_file, file_contents.data(), file_contents.size()));
// Upgrade.
@@ -96,7 +96,7 @@ TEST(SimpleVersionUpgradeTest, UpgradeV5V6IndexMustDisappear) {
const std::string file_contents("incorrectly serialized data");
const base::FilePath index_file = cache_path.AppendASCII(kIndexFileName);
ASSERT_EQ(implicit_cast<int>(file_contents.size()),
- file_util::WriteFile(
+ base::WriteFile(
index_file, file_contents.data(), file_contents.size()));
// Create a few entry-like files.
@@ -109,7 +109,7 @@ TEST(SimpleVersionUpgradeTest, UpgradeV5V6IndexMustDisappear) {
file_contents +
base::StringPrintf(" %" PRIx64, implicit_cast<uint64>(entry_hash));
ASSERT_EQ(implicit_cast<int>(entry_contents.size()),
- file_util::WriteFile(cache_path.AppendASCII(file_name),
+ base::WriteFile(cache_path.AppendASCII(file_name),
entry_contents.data(),
entry_contents.size()));
}
diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc
index e4edbb9..aa7967d 100644
--- a/net/http/http_network_transaction_unittest.cc
+++ b/net/http/http_network_transaction_unittest.cc
@@ -7861,7 +7861,7 @@ TEST_P(HttpNetworkTransactionTest, UploadUnreadableFile) {
base::FilePath temp_file;
ASSERT_TRUE(base::CreateTemporaryFile(&temp_file));
std::string temp_file_content("Unreadable file.");
- ASSERT_TRUE(file_util::WriteFile(temp_file, temp_file_content.c_str(),
+ ASSERT_TRUE(base::WriteFile(temp_file, temp_file_content.c_str(),
temp_file_content.length()));
ASSERT_TRUE(file_util::MakeFileUnreadable(temp_file));
diff --git a/net/http/transport_security_persister_unittest.cc b/net/http/transport_security_persister_unittest.cc
index 8c41f9e..114e933 100644
--- a/net/http/transport_security_persister_unittest.cc
+++ b/net/http/transport_security_persister_unittest.cc
@@ -127,8 +127,7 @@ TEST_F(TransportSecurityPersisterTest, SerializeData3) {
// than block.) Use a different basename just for cleanliness.
base::FilePath path =
temp_dir_.path().AppendASCII("TransportSecurityPersisterTest");
- EXPECT_TRUE(file_util::WriteFile(path, serialized.c_str(),
- serialized.size()));
+ EXPECT_TRUE(base::WriteFile(path, serialized.c_str(), serialized.size()));
// Read the data back.
std::string persisted;
diff --git a/net/proxy/proxy_config_service_linux_unittest.cc b/net/proxy/proxy_config_service_linux_unittest.cc
index 99a3b570b..5635a87 100644
--- a/net/proxy/proxy_config_service_linux_unittest.cc
+++ b/net/proxy/proxy_config_service_linux_unittest.cc
@@ -1502,8 +1502,8 @@ TEST_F(ProxyConfigServiceLinuxTest, KDEConfigParser) {
new ProxyConfigServiceLinux(env));
ProxyConfig config;
// Overwrite the kioslaverc file.
- file_util::WriteFile(kioslaverc_, tests[i].kioslaverc.c_str(),
- tests[i].kioslaverc.length());
+ base::WriteFile(kioslaverc_, tests[i].kioslaverc.c_str(),
+ tests[i].kioslaverc.length());
sync_config_getter.SetupAndInitialFetch();
ProxyConfigService::ConfigAvailability availability =
sync_config_getter.SyncGetLatestProxyConfig(&config);
@@ -1526,7 +1526,7 @@ TEST_F(ProxyConfigServiceLinuxTest, KDEHomePicker) {
GURL slaverc4_pac_url("http://wpad/wpad.dat");
// Overwrite the .kde kioslaverc file.
- file_util::WriteFile(kioslaverc_, slaverc3.c_str(), slaverc3.length());
+ base::WriteFile(kioslaverc_, slaverc3.c_str(), slaverc3.length());
// If .kde4 exists it will mess up the first test. It should not, as
// we created the directory for $HOME in the test setup.
@@ -1549,7 +1549,7 @@ TEST_F(ProxyConfigServiceLinuxTest, KDEHomePicker) {
// Now create .kde4 and put a kioslaverc in the config directory.
// Note that its timestamp will be at least as new as the .kde one.
base::CreateDirectory(kde4_config_);
- file_util::WriteFile(kioslaverc4_, slaverc4.c_str(), slaverc4.length());
+ base::WriteFile(kioslaverc4_, slaverc4.c_str(), slaverc4.length());
CHECK(base::PathExists(kioslaverc4_));
{ SCOPED_TRACE("KDE4, .kde4 directory present, use it");
diff --git a/net/spdy/spdy_network_transaction_unittest.cc b/net/spdy/spdy_network_transaction_unittest.cc
index aa1f43b..0fe89ef 100644
--- a/net/spdy/spdy_network_transaction_unittest.cc
+++ b/net/spdy/spdy_network_transaction_unittest.cc
@@ -449,7 +449,7 @@ class SpdyNetworkTransactionTest
base::FilePath file_path;
CHECK(base::CreateTemporaryFileInDir(temp_dir_.path(), &file_path));
CHECK_EQ(static_cast<int>(kUploadDataSize),
- file_util::WriteFile(file_path, kUploadData, kUploadDataSize));
+ base::WriteFile(file_path, kUploadData, kUploadDataSize));
ScopedVector<UploadElementReader> element_readers;
element_readers.push_back(
@@ -476,7 +476,7 @@ class SpdyNetworkTransactionTest
base::FilePath file_path;
CHECK(base::CreateTemporaryFileInDir(temp_dir_.path(), &file_path));
CHECK_EQ(static_cast<int>(kUploadDataSize),
- file_util::WriteFile(file_path, kUploadData, kUploadDataSize));
+ base::WriteFile(file_path, kUploadData, kUploadDataSize));
CHECK(file_util::MakeFileUnreadable(file_path));
ScopedVector<UploadElementReader> element_readers;
@@ -505,7 +505,7 @@ class SpdyNetworkTransactionTest
base::FilePath file_path;
CHECK(base::CreateTemporaryFileInDir(temp_dir_.path(), &file_path));
CHECK_EQ(static_cast<int>(kUploadDataSize),
- file_util::WriteFile(file_path, kUploadData, kUploadDataSize));
+ base::WriteFile(file_path, kUploadData, kUploadDataSize));
ScopedVector<UploadElementReader> element_readers;
element_readers.push_back(
diff --git a/net/tools/crl_set_dump/crl_set_dump.cc b/net/tools/crl_set_dump/crl_set_dump.cc
index 6c3bb54..ce6f5e5 100644
--- a/net/tools/crl_set_dump/crl_set_dump.cc
+++ b/net/tools/crl_set_dump/crl_set_dump.cc
@@ -62,8 +62,7 @@ int main(int argc, char** argv) {
if (!output_filename.empty()) {
const std::string out = final_crl_set->Serialize();
- if (file_util::WriteFile(output_filename, out.data(),
- out.size()) == -1) {
+ if (base::WriteFile(output_filename, out.data(), out.size()) == -1) {
fprintf(stderr, "Failed to write resulting CRL set\n");
return 1;
}
diff --git a/net/tools/tld_cleanup/tld_cleanup_util.cc b/net/tools/tld_cleanup/tld_cleanup_util.cc
index 623403f..88b6245 100644
--- a/net/tools/tld_cleanup/tld_cleanup_util.cc
+++ b/net/tools/tld_cleanup/tld_cleanup_util.cc
@@ -61,7 +61,7 @@ bool WriteRules(const RuleMap& rules, const base::FilePath& outfile) {
data.append("%%\n");
- int written = file_util::WriteFile(outfile,
+ int written = base::WriteFile(outfile,
data.data(),
static_cast<int>(data.size()));
diff --git a/net/url_request/url_fetcher_impl_unittest.cc b/net/url_request/url_fetcher_impl_unittest.cc
index c96993f..39e2bb2 100644
--- a/net/url_request/url_fetcher_impl_unittest.cc
+++ b/net/url_request/url_fetcher_impl_unittest.cc
@@ -1433,7 +1433,7 @@ TEST_F(URLFetcherFileTest, OverwriteExistingFile) {
std::string data(10000, '?'); // Meant to be larger than simple.html.
file_path_ = temp_dir.path().AppendASCII(kFileToFetch);
ASSERT_EQ(static_cast<int>(data.size()),
- file_util::WriteFile(file_path_, data.data(), data.size()));
+ base::WriteFile(file_path_, data.data(), data.size()));
ASSERT_TRUE(base::PathExists(file_path_));
expected_file_ = test_server.GetDocumentRoot().AppendASCII(kFileToFetch);
ASSERT_FALSE(base::ContentsEqual(file_path_, expected_file_));
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index 63e7c75..452e7e0 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -738,7 +738,7 @@ TEST_F(URLRequestTest, FileTestFullSpecifiedRange) {
base::FilePath temp_path;
EXPECT_TRUE(base::CreateTemporaryFile(&temp_path));
GURL temp_url = FilePathToFileURL(temp_path);
- EXPECT_TRUE(file_util::WriteFile(temp_path, buffer.get(), buffer_size));
+ EXPECT_TRUE(base::WriteFile(temp_path, buffer.get(), buffer_size));
int64 file_size;
EXPECT_TRUE(base::GetFileSize(temp_path, &file_size));
@@ -782,7 +782,7 @@ TEST_F(URLRequestTest, FileTestHalfSpecifiedRange) {
base::FilePath temp_path;
EXPECT_TRUE(base::CreateTemporaryFile(&temp_path));
GURL temp_url = FilePathToFileURL(temp_path);
- EXPECT_TRUE(file_util::WriteFile(temp_path, buffer.get(), buffer_size));
+ EXPECT_TRUE(base::WriteFile(temp_path, buffer.get(), buffer_size));
int64 file_size;
EXPECT_TRUE(base::GetFileSize(temp_path, &file_size));
@@ -825,7 +825,7 @@ TEST_F(URLRequestTest, FileTestMultipleRanges) {
base::FilePath temp_path;
EXPECT_TRUE(base::CreateTemporaryFile(&temp_path));
GURL temp_url = FilePathToFileURL(temp_path);
- EXPECT_TRUE(file_util::WriteFile(temp_path, buffer.get(), buffer_size));
+ EXPECT_TRUE(base::WriteFile(temp_path, buffer.get(), buffer_size));
int64 file_size;
EXPECT_TRUE(base::GetFileSize(temp_path, &file_size));
@@ -853,7 +853,7 @@ TEST_F(URLRequestTest, AllowFileURLs) {
base::FilePath test_file;
ASSERT_TRUE(base::CreateTemporaryFileInDir(temp_dir.path(), &test_file));
std::string test_data("monkey");
- file_util::WriteFile(test_file, test_data.data(), test_data.size());
+ base::WriteFile(test_file, test_data.data(), test_data.size());
GURL test_file_url = net::FilePathToFileURL(test_file);
{