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

Unified Diff: components/cronet/android/test/src/org/chromium/net/CronetTestFramework.java

Issue 2318493003: Clean up PathUtils unused parameters. (Closed)
Patch Set: Fix more. Created 4 years, 3 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: components/cronet/android/test/src/org/chromium/net/CronetTestFramework.java
diff --git a/components/cronet/android/test/src/org/chromium/net/CronetTestFramework.java b/components/cronet/android/test/src/org/chromium/net/CronetTestFramework.java
index c4e838c191a7c13237001b2491ed3ff70c9834dd..9eda8e515025d05833a6b82d60bbae2b6801e764 100644
--- a/components/cronet/android/test/src/org/chromium/net/CronetTestFramework.java
+++ b/components/cronet/android/test/src/org/chromium/net/CronetTestFramework.java
@@ -150,26 +150,26 @@ public class CronetTestFramework {
* Prepares the path for the test storage (http cache, QUIC server info).
*/
public static void prepareTestStorage(Context context) {
- File storage = new File(getTestStorageDirectory(context));
+ File storage = new File(getTestStorageDirectory());
if (storage.exists()) {
assertTrue(recursiveDelete(storage));
}
- ensureTestStorageExists(context);
+ ensureTestStorageExists();
}
/**
* Returns the path for the test storage (http cache, QUIC server info).
* NOTE: Does not ensure it exists; tests should use {@link #getTestStorage}.
*/
- private static String getTestStorageDirectory(Context context) {
- return PathUtils.getDataDirectory(context) + "/test_storage";
+ private static String getTestStorageDirectory() {
+ return PathUtils.getDataDirectory() + "/test_storage";
}
/**
* Ensures test storage directory exists, i.e. creates one if it does not exist.
*/
- private static void ensureTestStorageExists(Context context) {
- File storage = new File(getTestStorageDirectory(context));
+ private static void ensureTestStorageExists() {
+ File storage = new File(getTestStorageDirectory());
if (!storage.exists()) {
assertTrue(storage.mkdir());
}
@@ -180,8 +180,8 @@ public class CronetTestFramework {
* Also ensures it exists.
*/
static String getTestStorage(Context context) {
- ensureTestStorageExists(context);
- return getTestStorageDirectory(context);
+ ensureTestStorageExists();
+ return getTestStorageDirectory();
}
@SuppressFBWarnings("NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE")

Powered by Google App Engine
This is Rietveld 408576698