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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_store_file_unittest.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/safe_browsing/safe_browsing_store_file_unittest.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_store_file_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_store_file_unittest.cc
index ac8002f5d6ef61084cfd036684e49a059382f4b0..28add4a0d797eae763e6b3491b2d725ae2b06402 100644
--- a/chrome/browser/safe_browsing/safe_browsing_store_file_unittest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_store_file_unittest.cc
@@ -90,7 +90,7 @@ TEST_F(SafeBrowsingStoreFileTest, DetectsCorruption) {
EXPECT_FALSE(corruption_detected_);
// Corrupt the store.
- file_util::ScopedFILE file(file_util::OpenFile(filename_, "rb+"));
+ file_util::ScopedFILE file(base::OpenFile(filename_, "rb+"));
const long kOffset = 60;
EXPECT_EQ(fseek(file.get(), kOffset, SEEK_SET), 0);
const int32 kZero = 0;
@@ -114,7 +114,7 @@ TEST_F(SafeBrowsingStoreFileTest, DetectsCorruption) {
// Make it look like there is a lot of add-chunks-seen data.
const long kAddChunkCountOffset = 2 * sizeof(int32);
const int32 kLargeCount = 1000 * 1000 * 1000;
- file.reset(file_util::OpenFile(filename_, "rb+"));
+ file.reset(base::OpenFile(filename_, "rb+"));
EXPECT_EQ(fseek(file.get(), kAddChunkCountOffset, SEEK_SET), 0);
EXPECT_EQ(fwrite(&kLargeCount, sizeof(kLargeCount), 1, file.get()), 1U);
file.reset();
@@ -156,7 +156,7 @@ TEST_F(SafeBrowsingStoreFileTest, CheckValidityPayload) {
const size_t kOffset = 37;
{
- file_util::ScopedFILE file(file_util::OpenFile(filename_, "rb+"));
+ file_util::ScopedFILE file(base::OpenFile(filename_, "rb+"));
EXPECT_EQ(0, fseek(file.get(), kOffset, SEEK_SET));
EXPECT_GE(fputs("hello", file.get()), 0);
}
@@ -176,7 +176,7 @@ TEST_F(SafeBrowsingStoreFileTest, CheckValidityChecksum) {
const int kOffset = -static_cast<int>(sizeof(base::MD5Digest));
{
- file_util::ScopedFILE file(file_util::OpenFile(filename_, "rb+"));
+ file_util::ScopedFILE file(base::OpenFile(filename_, "rb+"));
EXPECT_EQ(0, fseek(file.get(), kOffset, SEEK_END));
EXPECT_GE(fputs("hello", file.get()), 0);
}

Powered by Google App Engine
This is Rietveld 408576698