| 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.net.impl; | 5 package org.chromium.net.impl; |
| 6 | 6 |
| 7 import android.content.Context; | 7 import android.content.Context; |
| 8 import android.os.Build; | 8 import android.os.Build; |
| 9 import android.os.ConditionVariable; | 9 import android.os.ConditionVariable; |
| 10 import android.os.Handler; | 10 import android.os.Handler; |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 } | 553 } |
| 554 } | 554 } |
| 555 | 555 |
| 556 @SuppressWarnings("unused") | 556 @SuppressWarnings("unused") |
| 557 @CalledByNative | 557 @CalledByNative |
| 558 private void onGetCertVerifierData(String certVerifierData) { | 558 private void onGetCertVerifierData(String certVerifierData) { |
| 559 mCertVerifierData = certVerifierData; | 559 mCertVerifierData = certVerifierData; |
| 560 mWaitGetCertVerifierDataComplete.open(); | 560 mWaitGetCertVerifierDataComplete.open(); |
| 561 } | 561 } |
| 562 | 562 |
| 563 void reportFinished(final CronetUrlRequest request) { | 563 void reportFinished(final RequestFinishedInfo requestInfo) { |
| 564 final RequestFinishedInfo requestInfo = request.getRequestFinishedInfo()
; | |
| 565 ArrayList<RequestFinishedInfo.Listener> currentListeners; | 564 ArrayList<RequestFinishedInfo.Listener> currentListeners; |
| 566 synchronized (mFinishedListenerLock) { | 565 synchronized (mFinishedListenerLock) { |
| 567 currentListeners = new ArrayList<RequestFinishedInfo.Listener>(mFini
shedListenerList); | 566 currentListeners = new ArrayList<RequestFinishedInfo.Listener>(mFini
shedListenerList); |
| 568 } | 567 } |
| 569 for (final RequestFinishedInfo.Listener listener : currentListeners) { | 568 for (final RequestFinishedInfo.Listener listener : currentListeners) { |
| 570 Runnable task = new Runnable() { | 569 Runnable task = new Runnable() { |
| 571 @Override | 570 @Override |
| 572 public void run() { | 571 public void run() { |
| 573 listener.onRequestFinished(requestInfo); | 572 listener.onRequestFinished(requestInfo); |
| 574 } | 573 } |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 @NativeClassQualifiedName("CronetURLRequestContextAdapter") | 633 @NativeClassQualifiedName("CronetURLRequestContextAdapter") |
| 635 private native void nativeProvideRTTObservations(long nativePtr, boolean sho
uld); | 634 private native void nativeProvideRTTObservations(long nativePtr, boolean sho
uld); |
| 636 | 635 |
| 637 @NativeClassQualifiedName("CronetURLRequestContextAdapter") | 636 @NativeClassQualifiedName("CronetURLRequestContextAdapter") |
| 638 private native void nativeProvideThroughputObservations(long nativePtr, bool
ean should); | 637 private native void nativeProvideThroughputObservations(long nativePtr, bool
ean should); |
| 639 | 638 |
| 640 public boolean isNetworkThread(Thread thread) { | 639 public boolean isNetworkThread(Thread thread) { |
| 641 return thread == mNetworkThread; | 640 return thread == mNetworkThread; |
| 642 } | 641 } |
| 643 } | 642 } |
| OLD | NEW |