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

Unified Diff: content/browser/storage_partition_impl_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: content/browser/storage_partition_impl_unittest.cc
diff --git a/content/browser/storage_partition_impl_unittest.cc b/content/browser/storage_partition_impl_unittest.cc
index 008a898b2e899d14722a75575e9489f89fd9f1ae..ef3b67912ac377db7c35d7a074edf331b2390f2c 100644
--- a/content/browser/storage_partition_impl_unittest.cc
+++ b/content/browser/storage_partition_impl_unittest.cc
@@ -210,12 +210,16 @@ class RemoveLocalStorageTester {
file_util::WriteFile(storage_path.Append(kDomStorageOrigin3), NULL, 0);
// Tweak their dates.
- file_util::SetLastModifiedTime(storage_path.Append(kDomStorageOrigin1),
- base::Time::Now());
- file_util::SetLastModifiedTime(storage_path.Append(kDomStorageOrigin2),
- base::Time::Now() - base::TimeDelta::FromDays(1));
- file_util::SetLastModifiedTime(storage_path.Append(kDomStorageOrigin3),
- base::Time::Now() - base::TimeDelta::FromDays(60));
+ base::Time now = base::Time::Now();
viettrungluu 2013/12/04 21:09:23 (ditto)
+ base::TouchFile(storage_path.Append(kDomStorageOrigin1), now, now);
+
+ base::Time one_day_ago = now - base::TimeDelta::FromDays(1);
+ base::TouchFile(storage_path.Append(kDomStorageOrigin2),
+ one_day_ago, one_day_ago);
+
+ base::Time sixty_days_ago = now - base::TimeDelta::FromDays(60);
+ base::TouchFile(storage_path.Append(kDomStorageOrigin3),
+ sixty_days_ago, sixty_days_ago);
}
private:

Powered by Google App Engine
This is Rietveld 408576698