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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_database_unittest.cc

Issue 105293002: 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
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_database.cc ('k') | chrome/browser/ui/pdf/pdf_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
index 94b71bd81645dd728dff3a1ce18ed00368e7c5d0..8d3f21fb7c3737259a6a46ced8ed4bbf1addc2c9 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
@@ -1636,7 +1636,7 @@ TEST_F(SafeBrowsingDatabaseTest, EmptyUpdate) {
// Get an older time to reset the lastmod time for detecting whether
// the file has been updated.
base::PlatformFileInfo before_info, after_info;
- ASSERT_TRUE(file_util::GetFileInfo(filename, &before_info));
+ ASSERT_TRUE(base::GetFileInfo(filename, &before_info));
const base::Time old_last_modified =
before_info.last_modified - base::TimeDelta::FromSeconds(10);
@@ -1644,7 +1644,7 @@ TEST_F(SafeBrowsingDatabaseTest, EmptyUpdate) {
// needed because otherwise the entire test can finish w/in the
// resolution of the lastmod time.
ASSERT_TRUE(file_util::SetLastModifiedTime(filename, old_last_modified));
- ASSERT_TRUE(file_util::GetFileInfo(filename, &before_info));
+ ASSERT_TRUE(base::GetFileInfo(filename, &before_info));
EXPECT_TRUE(database_->UpdateStarted(&lists));
chunk.hosts.clear();
InsertAddChunkHostPrefixUrl(&chunk, 2, "www.foo.com/",
@@ -1653,25 +1653,25 @@ TEST_F(SafeBrowsingDatabaseTest, EmptyUpdate) {
chunks.push_back(chunk);
database_->InsertChunks(safe_browsing_util::kMalwareList, chunks);
database_->UpdateFinished(true);
- ASSERT_TRUE(file_util::GetFileInfo(filename, &after_info));
+ ASSERT_TRUE(base::GetFileInfo(filename, &after_info));
EXPECT_LT(before_info.last_modified, after_info.last_modified);
// Deleting a chunk updates the database file.
ASSERT_TRUE(file_util::SetLastModifiedTime(filename, old_last_modified));
- ASSERT_TRUE(file_util::GetFileInfo(filename, &before_info));
+ ASSERT_TRUE(base::GetFileInfo(filename, &before_info));
EXPECT_TRUE(database_->UpdateStarted(&lists));
AddDelChunk(safe_browsing_util::kMalwareList, chunk.chunk_number);
database_->UpdateFinished(true);
- ASSERT_TRUE(file_util::GetFileInfo(filename, &after_info));
+ ASSERT_TRUE(base::GetFileInfo(filename, &after_info));
EXPECT_LT(before_info.last_modified, after_info.last_modified);
// Simply calling |UpdateStarted()| then |UpdateFinished()| does not
// update the database file.
ASSERT_TRUE(file_util::SetLastModifiedTime(filename, old_last_modified));
- ASSERT_TRUE(file_util::GetFileInfo(filename, &before_info));
+ ASSERT_TRUE(base::GetFileInfo(filename, &before_info));
EXPECT_TRUE(database_->UpdateStarted(&lists));
database_->UpdateFinished(true);
- ASSERT_TRUE(file_util::GetFileInfo(filename, &after_info));
+ ASSERT_TRUE(base::GetFileInfo(filename, &after_info));
EXPECT_EQ(before_info.last_modified, after_info.last_modified);
}
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_database.cc ('k') | chrome/browser/ui/pdf/pdf_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698