| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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.annotation.SuppressLint; | 7 import android.annotation.SuppressLint; |
| 8 import android.content.BroadcastReceiver; | 8 import android.content.BroadcastReceiver; |
| 9 import android.content.Context; | 9 import android.content.Context; |
| 10 import android.content.Intent; | 10 import android.content.Intent; |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 /** | 170 /** |
| 171 * Lock object used to synchronize all calls that modify or depend on the tr
ust managers. | 171 * Lock object used to synchronize all calls that modify or depend on the tr
ust managers. |
| 172 */ | 172 */ |
| 173 private static final Object sLock = new Object(); | 173 private static final Object sLock = new Object(); |
| 174 | 174 |
| 175 /** | 175 /** |
| 176 * Allow disabling registering the observer and recording histograms for the
certificate | 176 * Allow disabling registering the observer and recording histograms for the
certificate |
| 177 * changes. Net unit tests do not load native libraries which prevent this t
o succeed. Moreover, | 177 * changes. Net unit tests do not load native libraries which prevent this t
o succeed. Moreover, |
| 178 * the system does not allow to interact with the certificate store without
user interaction. | 178 * the system does not allow to interact with the certificate store without
user interaction. |
| 179 */ | 179 */ |
| 180 private static boolean sDisableNativeCodeForTest = false; | 180 private static boolean sDisableNativeCodeForTest; |
| 181 | 181 |
| 182 /** | 182 /** |
| 183 * Ensures that the trust managers and certificate factory are initialized. | 183 * Ensures that the trust managers and certificate factory are initialized. |
| 184 */ | 184 */ |
| 185 private static void ensureInitialized() throws CertificateException, | 185 private static void ensureInitialized() throws CertificateException, |
| 186 KeyStoreException, NoSuchAlgorithmException { | 186 KeyStoreException, NoSuchAlgorithmException { |
| 187 synchronized (sLock) { | 187 synchronized (sLock) { |
| 188 ensureInitializedLocked(); | 188 ensureInitializedLocked(); |
| 189 } | 189 } |
| 190 } | 190 } |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 */ | 525 */ |
| 526 private static native void nativeNotifyKeyChainChanged(); | 526 private static native void nativeNotifyKeyChainChanged(); |
| 527 | 527 |
| 528 /** | 528 /** |
| 529 * Record histograms on the platform's certificate verification capabilities
. | 529 * Record histograms on the platform's certificate verification capabilities
. |
| 530 */ | 530 */ |
| 531 private static native void nativeRecordCertVerifyCapabilitiesHistogram( | 531 private static native void nativeRecordCertVerifyCapabilitiesHistogram( |
| 532 boolean foundSystemTrustRoots); | 532 boolean foundSystemTrustRoots); |
| 533 | 533 |
| 534 } | 534 } |
| OLD | NEW |