| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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.net; | 5 package org.chromium.net; |
| 6 | 6 |
| 7 import android.content.Context; | 7 import android.content.Context; |
| 8 import android.os.Handler; | 8 import android.os.Handler; |
| 9 import android.os.Looper; | 9 import android.os.Looper; |
| 10 | 10 |
| 11 import org.chromium.base.JNINamespace; | 11 import org.chromium.base.annotations.JNINamespace; |
| 12 | 12 |
| 13 /** | 13 /** |
| 14 * CronetLibraryLoader loads and initializes native library on main thread. | 14 * CronetLibraryLoader loads and initializes native library on main thread. |
| 15 */ | 15 */ |
| 16 @JNINamespace("cronet") | 16 @JNINamespace("cronet") |
| 17 class CronetLibraryLoader { | 17 class CronetLibraryLoader { |
| 18 /** | 18 /** |
| 19 * Synchronize access to sInitTaskPosted and initialization routine. | 19 * Synchronize access to sInitTaskPosted and initialization routine. |
| 20 */ | 20 */ |
| 21 private static final Object sLoadLock = new Object(); | 21 private static final Object sLoadLock = new Object(); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 // the undesired initial network change observer notification, which | 71 // the undesired initial network change observer notification, which |
| 72 // will cause active requests to fail with ERR_NETWORK_CHANGED. | 72 // will cause active requests to fail with ERR_NETWORK_CHANGED. |
| 73 nativeCronetInitOnMainThread(); | 73 nativeCronetInitOnMainThread(); |
| 74 } | 74 } |
| 75 | 75 |
| 76 // Native methods are implemented in cronet_loader.cc. | 76 // Native methods are implemented in cronet_loader.cc. |
| 77 private static native void nativeCronetInitOnMainThread(); | 77 private static native void nativeCronetInitOnMainThread(); |
| 78 private static native void nativeCronetInitApplicationContext(Context appCon
text); | 78 private static native void nativeCronetInitApplicationContext(Context appCon
text); |
| 79 private static native String nativeGetCronetVersion(); | 79 private static native String nativeGetCronetVersion(); |
| 80 } | 80 } |
| OLD | NEW |