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

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

Issue 100453006: Move Touch to base namespace, remove SetLastModifiedTime. (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_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 8d3f21fb7c3737259a6a46ced8ed4bbf1addc2c9..981085896b45ffd559007743c3793ce57c238e89 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
@@ -1643,7 +1643,7 @@ TEST_F(SafeBrowsingDatabaseTest, EmptyUpdate) {
// Inserting another chunk updates the database file. The sleep is
// 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(base::TouchFile(filename, old_last_modified, old_last_modified));
ASSERT_TRUE(base::GetFileInfo(filename, &before_info));
EXPECT_TRUE(database_->UpdateStarted(&lists));
chunk.hosts.clear();
@@ -1657,7 +1657,7 @@ TEST_F(SafeBrowsingDatabaseTest, EmptyUpdate) {
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(base::TouchFile(filename, old_last_modified, old_last_modified));
ASSERT_TRUE(base::GetFileInfo(filename, &before_info));
EXPECT_TRUE(database_->UpdateStarted(&lists));
AddDelChunk(safe_browsing_util::kMalwareList, chunk.chunk_number);
@@ -1667,7 +1667,7 @@ TEST_F(SafeBrowsingDatabaseTest, EmptyUpdate) {
// Simply calling |UpdateStarted()| then |UpdateFinished()| does not
// update the database file.
- ASSERT_TRUE(file_util::SetLastModifiedTime(filename, old_last_modified));
+ ASSERT_TRUE(base::TouchFile(filename, old_last_modified, old_last_modified));
ASSERT_TRUE(base::GetFileInfo(filename, &before_info));
EXPECT_TRUE(database_->UpdateStarted(&lists));
database_->UpdateFinished(true);

Powered by Google App Engine
This is Rietveld 408576698