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

Unified Diff: tools/telemetry/telemetry/core/platform/__init__.py

Issue 20766003: [Telemetry] Add the ability to flush the system file cache to platform. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Simpler Android support Created 7 years, 5 months 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: tools/telemetry/telemetry/core/platform/__init__.py
diff --git a/tools/telemetry/telemetry/core/platform/__init__.py b/tools/telemetry/telemetry/core/platform/__init__.py
index f9a3dffb5a5e398356aedd10cfd3dd0ffb9def4c..5b88286cfa81acd5a52e23f59b31964540f4b090 100644
--- a/tools/telemetry/telemetry/core/platform/__init__.py
+++ b/tools/telemetry/telemetry/core/platform/__init__.py
@@ -84,3 +84,23 @@ class Platform(object):
Examples: VISTA, WIN7, LION, MOUNTAINLION"""
return self._platform_backend.GetOSVersionName()
+
+ def CanFlushIndividualFilesFromSystemCache(self):
+ """Returns true if the disk cache can be flushed for specific files."""
+ return self._platform_backend.CanFlushIndividualFilesFromSystemCache()
+
+ def FlushEntireSystemCache(self):
+ """Flushes the OS's file cache completely.
+
+ This function may require root or administrator access."""
+ return self._platform_backend.FlushEntireSystemCache()
+
+ def FlushSystemCacheForDirectory(self, directory, ignoring=None):
+ """Flushes the OS's file cache for the specified directory.
+
+ Any files or directories inside |directory| matching a name in the
+ |ignoring| list will be skipped.
+
+ This function does not require root or administrator access."""
+ return self._platform_backend.FlushSystemCacheForDirectory(
+ directory, ignoring=ignoring)

Powered by Google App Engine
This is Rietveld 408576698