Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Side by Side Diff: components/cronet/android/java/src/org/chromium/net/CronetBidirectionalStream.java

Issue 2106453002: [Cronet] Remove unused ping and windowUpdate methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/cronet/android/api/src/org/chromium/net/BidirectionalStream.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 org.chromium.base.Log; 7 import org.chromium.base.Log;
8 import org.chromium.base.VisibleForTesting; 8 import org.chromium.base.VisibleForTesting;
9 import org.chromium.base.annotations.CalledByNative; 9 import org.chromium.base.annotations.CalledByNative;
10 import org.chromium.base.annotations.JNINamespace; 10 import org.chromium.base.annotations.JNINamespace;
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 synchronized (mNativeStreamLock) { 396 synchronized (mNativeStreamLock) {
397 List<ByteBuffer> flushData = new LinkedList<ByteBuffer>(); 397 List<ByteBuffer> flushData = new LinkedList<ByteBuffer>();
398 for (ByteBuffer buffer : mFlushData) { 398 for (ByteBuffer buffer : mFlushData) {
399 flushData.add(buffer.asReadOnlyBuffer()); 399 flushData.add(buffer.asReadOnlyBuffer());
400 } 400 }
401 return flushData; 401 return flushData;
402 } 402 }
403 } 403 }
404 404
405 @Override 405 @Override
406 public void ping(PingCallback callback, Executor executor) {
407 // TODO(mef): May be last thing to be implemented on Android.
408 throw new UnsupportedOperationException("ping is not supported yet.");
409 }
410
411 @Override
412 public void windowUpdate(int windowSizeIncrement) {
413 // TODO(mef): Understand the needs and semantics of this method.
414 throw new UnsupportedOperationException("windowUpdate is not supported y et.");
415 }
416
417 @Override
418 public void cancel() { 406 public void cancel() {
419 synchronized (mNativeStreamLock) { 407 synchronized (mNativeStreamLock) {
420 if (isDoneLocked() || mReadState == State.NOT_STARTED) { 408 if (isDoneLocked() || mReadState == State.NOT_STARTED) {
421 return; 409 return;
422 } 410 }
423 mReadState = mWriteState = State.CANCELED; 411 mReadState = mWriteState = State.CANCELED;
424 destroyNativeStreamLocked(true); 412 destroyNativeStreamLocked(true);
425 } 413 }
426 } 414 }
427 415
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 private native boolean nativeReadData( 753 private native boolean nativeReadData(
766 long nativePtr, ByteBuffer byteBuffer, int position, int limit); 754 long nativePtr, ByteBuffer byteBuffer, int position, int limit);
767 755
768 @NativeClassQualifiedName("CronetBidirectionalStreamAdapter") 756 @NativeClassQualifiedName("CronetBidirectionalStreamAdapter")
769 private native boolean nativeWritevData(long nativePtr, ByteBuffer[] buffers , int[] positions, 757 private native boolean nativeWritevData(long nativePtr, ByteBuffer[] buffers , int[] positions,
770 int[] limits, boolean endOfStream); 758 int[] limits, boolean endOfStream);
771 759
772 @NativeClassQualifiedName("CronetBidirectionalStreamAdapter") 760 @NativeClassQualifiedName("CronetBidirectionalStreamAdapter")
773 private native void nativeDestroy(long nativePtr, boolean sendOnCanceled); 761 private native void nativeDestroy(long nativePtr, boolean sendOnCanceled);
774 } 762 }
OLDNEW
« no previous file with comments | « components/cronet/android/api/src/org/chromium/net/BidirectionalStream.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698