| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.chrome.browser.init; | 5 package org.chromium.chrome.browser.init; |
| 6 | 6 |
| 7 import android.app.Activity; | 7 import android.app.Activity; |
| 8 import android.content.Context; | 8 import android.content.Context; |
| 9 import android.os.AsyncTask; | 9 import android.os.AsyncTask; |
| 10 import android.os.Build; | 10 import android.os.Build; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 } | 106 } |
| 107 | 107 |
| 108 @RemovableInRelease | 108 @RemovableInRelease |
| 109 private void initLeakCanary() { | 109 private void initLeakCanary() { |
| 110 // Watch that Activity objects are not retained after their onDestroy()
has been called. | 110 // Watch that Activity objects are not retained after their onDestroy()
has been called. |
| 111 // This is a no-op in release builds. | 111 // This is a no-op in release builds. |
| 112 LeakCanary.install(mApplication); | 112 LeakCanary.install(mApplication); |
| 113 } | 113 } |
| 114 | 114 |
| 115 /** | 115 /** |
| 116 * @return whether native initialization is complete. |
| 117 */ |
| 118 public boolean hasNativeInitializationCompleted() { |
| 119 return mNativeInitializationComplete; |
| 120 } |
| 121 |
| 122 /** |
| 116 * Initializes the Chrome browser process synchronously. | 123 * Initializes the Chrome browser process synchronously. |
| 117 * | 124 * |
| 118 * @throws ProcessInitException if there is a problem with the native librar
y. | 125 * @throws ProcessInitException if there is a problem with the native librar
y. |
| 119 */ | 126 */ |
| 120 public void handleSynchronousStartup() throws ProcessInitException { | 127 public void handleSynchronousStartup() throws ProcessInitException { |
| 121 handleSynchronousStartupInternal(false); | 128 handleSynchronousStartupInternal(false); |
| 122 } | 129 } |
| 123 | 130 |
| 124 /** | 131 /** |
| 125 * Initializes the Chrome browser process synchronously with GPU process war
mup. | 132 * Initializes the Chrome browser process synchronously with GPU process war
mup. |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 } | 452 } |
| 446 | 453 |
| 447 /** | 454 /** |
| 448 * For unit testing of clients. | 455 * For unit testing of clients. |
| 449 * @param initializer The (dummy or mocked) initializer to use. | 456 * @param initializer The (dummy or mocked) initializer to use. |
| 450 */ | 457 */ |
| 451 public static void setForTesting(ChromeBrowserInitializer initializer) { | 458 public static void setForTesting(ChromeBrowserInitializer initializer) { |
| 452 sChromeBrowserInitializer = initializer; | 459 sChromeBrowserInitializer = initializer; |
| 453 } | 460 } |
| 454 } | 461 } |
| OLD | NEW |