From 5fd5d74f794cc92d24882803dcf355ac24e01ac4 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Fri, 26 Nov 2010 11:55:35 +0000 Subject: No longer need to pass storage paths to WebRequestContext.cleanupPrivateBrowsingFiles() Requires the following changes to external/webkit and packages/apps/Browser https://android-git.corp.google.com/g/81781 https://android-git.corp.google.com/g/81780 Bug: 3232569 Change-Id: I0247f3db25edfdc95363a5a94296458b20456a46 --- core/java/android/webkit/WebView.java | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 56325f6..a98c83a 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -1923,25 +1923,15 @@ public class WebView extends AbsoluteLayout * browsing session and clears any internal state associated with that * session. The consequences of calling this method while a private * browsing session is active are unspecified. - * @param context The same context which was used to create the private - * browsing WebView. * @return True if the private browsing files were successfully deleted, * false otherwise. * @hide pending API council approval. */ - public static boolean cleanupPrivateBrowsingFiles(Context context) { - // It seems wrong that we have to pass the storage locations here, given - // that the storage files are created native-side in WebRequestContext - // (albeit using a dumb getter on BrowserFrame to get the paths from - // Java). It looks like this is required because we may need to call - // this method before the BrowserFrame has been set up. - // TODO: Investigate whether this can be avoided. - return nativeCleanupPrivateBrowsingFiles(context.getDatabasePath("dummy").getParent(), - context.getCacheDir().getAbsolutePath()); + public static boolean cleanupPrivateBrowsingFiles() { + return nativeCleanupPrivateBrowsingFiles(); } - private static native boolean nativeCleanupPrivateBrowsingFiles(String databaseDirectory, - String cacheDirectory); + private static native boolean nativeCleanupPrivateBrowsingFiles(); private boolean extendScroll(int y) { int finalY = mScroller.getFinalY(); -- cgit v1.1