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

Unified Diff: content/shell/android/browsertests/src/org/chromium/content_shell/browsertests/ContentShellBrowserTestActivity.java

Issue 2247143004: Remove app context init from LibraryLoader. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix per review. 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: content/shell/android/browsertests/src/org/chromium/content_shell/browsertests/ContentShellBrowserTestActivity.java
diff --git a/content/shell/android/browsertests/src/org/chromium/content_shell/browsertests/ContentShellBrowserTestActivity.java b/content/shell/android/browsertests/src/org/chromium/content_shell/browsertests/ContentShellBrowserTestActivity.java
index 12627127eccecd60fa518028f8a673d8beff1321..20d2d1549eafc46143e7945ffde5a9e3f713a6b3 100644
--- a/content/shell/android/browsertests/src/org/chromium/content_shell/browsertests/ContentShellBrowserTestActivity.java
+++ b/content/shell/android/browsertests/src/org/chromium/content_shell/browsertests/ContentShellBrowserTestActivity.java
@@ -18,8 +18,6 @@ import org.chromium.native_test.NativeBrowserTestActivity;
import org.chromium.ui.base.ActivityWindowAndroid;
import org.chromium.ui.base.WindowAndroid;
-import java.io.File;
-
/** An Activity base class for running browser tests against ContentShell. */
public abstract class ContentShellBrowserTestActivity extends NativeBrowserTestActivity {
@@ -28,44 +26,17 @@ public abstract class ContentShellBrowserTestActivity extends NativeBrowserTestA
private ShellManager mShellManager;
private WindowAndroid mWindowAndroid;
- /** Deletes a file or directory along with any of its children.
- *
- * Note that, like File.delete(), this returns false if the file or directory couldn't be
- * fully deleted. This means that, in the directory case, some files may be deleted even if
- * the entire directory couldn't be.
- *
- * @param file The file or directory to delete.
- * @return Whether or not the file or directory was deleted.
- */
- private static boolean deleteRecursive(File file) {
- if (file == null) return true;
-
- File[] children = file.listFiles();
- if (children != null) {
- for (File child : children) {
- if (!deleteRecursive(child)) {
- return false;
- }
- }
- }
- return file.delete();
- }
-
- /** Initializes the browser process.
- *
- * This generally includes loading native libraries and switching to the native command line,
- * among other things.
+ /**
+ * Initializes the browser process.
*
- * @param privateDataDirectory The private data directory to clear before starting the
- * browser process. Can be null.
- * @throws ProcessInitException if the native libraries cannot be loaded.
+ * This generally includes loading native libraries and switching to the native command line,
+ * among other things.
*/
@Override
@SuppressFBWarnings("DM_EXIT")
protected void initializeBrowserProcess() {
try {
- LibraryLoader.get(LibraryProcessType.PROCESS_BROWSER)
- .ensureInitialized(getApplicationContext());
+ LibraryLoader.get(LibraryProcessType.PROCESS_BROWSER).ensureInitialized();
} catch (ProcessInitException e) {
Log.e(TAG, "Cannot load content_browsertests.", e);
System.exit(-1);

Powered by Google App Engine
This is Rietveld 408576698