summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorjorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-26 03:10:35 +0000
committerjorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-26 03:10:35 +0000
commitbbc32cfd8565e0fc4cf29af8901308a29155c503 (patch)
treeb73629a4296c5f667b1d1766953977ec96250d18 /base
parenta54f55be8e6075ea342843259bcbf1cf25d05806 (diff)
downloadchromium_src-bbc32cfd8565e0fc4cf29af8901308a29155c503.zip
chromium_src-bbc32cfd8565e0fc4cf29af8901308a29155c503.tar.gz
chromium_src-bbc32cfd8565e0fc4cf29af8901308a29155c503.tar.bz2
Merge 33162 - For now, let's clear local storage whenever we clear cookies.
BUG=28788 TEST="Clear private data..." from the menu, check cookies, and tell it ok. Data in "Local Storage" inside the profile's data dir should be deleted and any open websites that were using that data should no longer be able to see it. Review URL: http://codereview.chromium.org/441012 TBR=jorlow@chromium.org Review URL: http://codereview.chromium.org/440034 git-svn-id: svn://svn.chromium.org/chrome/branches/249/src@33173 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/file_util.h4
-rw-r--r--base/file_util_posix.cc5
-rw-r--r--base/file_util_win.cc7
3 files changed, 16 insertions, 0 deletions
diff --git a/base/file_util.h b/base/file_util.h
index 9a590a4..71e2e12 100644
--- a/base/file_util.h
+++ b/base/file_util.h
@@ -520,6 +520,10 @@ bool RenameFileAndResetSecurityDescriptor(
const FilePath& source_file_path,
const FilePath& target_file_path);
+// Returns whether the file has been modified since a particular date.
+bool HasFileBeenModifiedSince(const FileEnumerator::FindInfo& find_info,
+ const base::Time& cutoff_time);
+
} // namespace file_util
#endif // BASE_FILE_UTIL_H_
diff --git a/base/file_util_posix.cc b/base/file_util_posix.cc
index 6c5b86a..45ca147 100644
--- a/base/file_util_posix.cc
+++ b/base/file_util_posix.cc
@@ -706,4 +706,9 @@ void MemoryMappedFile::CloseHandles() {
file_ = -1;
}
+bool HasFileBeenModifiedSince(const FileEnumerator::FindInfo& find_info,
+ const base::Time& cutoff_time) {
+ return find_info.stat.st_mtime >= cutoff_time.ToTimeT();
+}
+
} // namespace file_util
diff --git a/base/file_util_win.cc b/base/file_util_win.cc
index d6edc6f..cbe61b0 100644
--- a/base/file_util_win.cc
+++ b/base/file_util_win.cc
@@ -807,4 +807,11 @@ void MemoryMappedFile::CloseHandles() {
length_ = INVALID_FILE_SIZE;
}
+bool HasFileBeenModifiedSince(const FileEnumerator::FindInfo& find_info,
+ const base::Time& cutoff_time) {
+ long result = CompareFileTime(&find_info.ftLastWriteTime,
+ &cutoff_time.ToFileTime());
+ return result == 1 || result == 0;
+}
+
} // namespace file_util