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

Unified Diff: net/disk_cache/simple/simple_version_upgrade_unittest.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
« no previous file with comments | « net/disk_cache/simple/simple_index_file_unittest.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/simple/simple_version_upgrade_unittest.cc
diff --git a/net/disk_cache/simple/simple_version_upgrade_unittest.cc b/net/disk_cache/simple/simple_version_upgrade_unittest.cc
index a5493f7c6eb2244448c1fd5a8875b6a50f0d73d2..15f4fa16ec8bde64217b2907a286f0e6ccf8c75b 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()));
}
« no previous file with comments | « net/disk_cache/simple/simple_index_file_unittest.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698