| Index: chrome/android/java/src/org/chromium/chrome/browser/cookies/CookiesFetcher.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/cookies/CookiesFetcher.java b/chrome/android/java/src/org/chromium/chrome/browser/cookies/CookiesFetcher.java
|
| index a7843d8c8d5279960dac5681ae09b10d32f1bed9..714f639d665c4c2181da8f199d4c44bd420626cd 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/cookies/CookiesFetcher.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/cookies/CookiesFetcher.java
|
| @@ -13,7 +13,6 @@ import org.chromium.base.ThreadUtils;
|
| import org.chromium.base.annotations.CalledByNative;
|
| import org.chromium.chrome.browser.profiles.Profile;
|
| import org.chromium.content.browser.crypto.CipherFactory;
|
| -import org.chromium.content.common.CleanupReference;
|
|
|
| import java.io.ByteArrayOutputStream;
|
| import java.io.DataInputStream;
|
| @@ -42,8 +41,6 @@ public class CookiesFetcher {
|
| /** Native-side pointer. */
|
| private final long mNativeCookiesFetcher;
|
|
|
| - private final CleanupReference mCleanupReference;
|
| -
|
| private final Context mContext;
|
|
|
| /**
|
| @@ -58,9 +55,9 @@ public class CookiesFetcher {
|
| * would not collect it until the callback has been invoked.
|
| */
|
| private CookiesFetcher(Context context) {
|
| + // Native side is responsible for destroying itself under all code paths.
|
| mNativeCookiesFetcher = nativeInit();
|
| mContext = context.getApplicationContext();
|
| - mCleanupReference = new CleanupReference(this, new DestroyRunnable(mNativeCookiesFetcher));
|
| }
|
|
|
| /**
|
| @@ -247,26 +244,12 @@ public class CookiesFetcher {
|
| }
|
| }
|
|
|
| - private static final class DestroyRunnable implements Runnable {
|
| - private final long mNativeCookiesFetcher;
|
| -
|
| - private DestroyRunnable(long nativeCookiesFetcher) {
|
| - mNativeCookiesFetcher = nativeCookiesFetcher;
|
| - }
|
| -
|
| - @Override
|
| - public void run() {
|
| - if (mNativeCookiesFetcher != 0) nativeDestroy(mNativeCookiesFetcher);
|
| - }
|
| - }
|
| -
|
| @CalledByNative
|
| private CanonicalCookie[] createCookiesArray(int size) {
|
| return new CanonicalCookie[size];
|
| }
|
|
|
| private native long nativeInit();
|
| - private static native void nativeDestroy(long nativeCookiesFetcher);
|
| private native void nativePersistCookies(long nativeCookiesFetcher);
|
| private static native void nativeRestoreCookies(String name, String value, String domain,
|
| String path, long creation, long expiration, long lastAccess, boolean secure,
|
|
|