Android: Remove BaseChromiumApplication

Replaces it with the default android.app.Application.
BaseChromiumApplication was almost empty and current code has been
moved to "Application"s that used to extend it (if applicable).

Motivation: Prevent devs from making the incorrect assumption that
BaseChromiumApplication is always used (webview does not use it).

TBR=agrieve
Bug: 560466

Change-Id: Ia704dbd5b4e7016d142d3bd4d1be367e26682064
Reviewed-on: https://chromium-review.googlesource.com/909556
Commit-Queue: agrieve <agrieve@chromium.org>
Reviewed-by: Luke Halliwell <halliwell@chromium.org>
Reviewed-by: agrieve <agrieve@chromium.org>
Reviewed-by: Eric Stevenson <estevenson@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538193}

CrOS-Libchrome-Original-Commit: e984b291762d6e7de386eab1c8072504b66315e5
diff --git a/base/android/java/src/org/chromium/base/BaseChromiumApplication.java b/base/android/java/src/org/chromium/base/BaseChromiumApplication.java
deleted file mode 100644
index 649090b..0000000
--- a/base/android/java/src/org/chromium/base/BaseChromiumApplication.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.chromium.base;
-
-import android.app.Application;
-import android.content.Context;
-
-import org.chromium.base.multidex.ChromiumMultiDexInstaller;
-
-/**
- * Basic application functionality that should be shared among all browser applications.
- */
-public class BaseChromiumApplication extends Application {
-    private static final String TAG = "base";
-
-    @Override
-    protected void attachBaseContext(Context base) {
-        super.attachBaseContext(base);
-        assert getBaseContext() != null;
-        checkAppBeingReplaced();
-        if (BuildConfig.isMultidexEnabled()) {
-            ChromiumMultiDexInstaller.install(this);
-        }
-    }
-
-    /** Ensure this application object is not out-of-date. */
-    private void checkAppBeingReplaced() {
-        // During app update the old apk can still be triggered by broadcasts and spin up an
-        // out-of-date application. Kill old applications in this bad state. See
-        // http://crbug.com/658130 for more context and http://b.android.com/56296 for the bug.
-        if (getResources() == null) {
-            Log.e(TAG, "getResources() null, closing app.");
-            System.exit(0);
-        }
-    }
-
-}
diff --git a/base/android/junit/src/org/chromium/base/ApplicationStatusTest.java b/base/android/junit/src/org/chromium/base/ApplicationStatusTest.java
index 07118bf..eb18295 100644
--- a/base/android/junit/src/org/chromium/base/ApplicationStatusTest.java
+++ b/base/android/junit/src/org/chromium/base/ApplicationStatusTest.java
@@ -27,7 +27,7 @@
 
 /** Unit tests for {@link ApplicationStatus}. */
 @RunWith(BaseRobolectricTestRunner.class)
-@Config(manifest = Config.NONE, application = BaseChromiumApplication.class,
+@Config(manifest = Config.NONE,
         shadows = {ApplicationStatusTest.TrackingShadowActivity.class, ShadowMultiDex.class})
 public class ApplicationStatusTest {
     /** Shadow that tracks calls to onWindowFocusChanged and dispatchKeyEvent. */