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

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

Issue 2367993002: Lint suppressions needed for Android SDK roll. (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | components/cronet/android/java/src/org/chromium/net/impl/CronetUploadDataStream.java » ('j') | 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 android.annotation.SuppressLint;
7 import android.annotation.TargetApi; 8 import android.annotation.TargetApi;
8 import android.net.TrafficStats; 9 import android.net.TrafficStats;
9 import android.os.Build; 10 import android.os.Build;
10 import android.util.Log; 11 import android.util.Log;
11 12
12 import java.io.Closeable; 13 import java.io.Closeable;
13 import java.io.IOException; 14 import java.io.IOException;
14 import java.io.OutputStream; 15 import java.io.OutputStream;
15 import java.net.HttpURLConnection; 16 import java.net.HttpURLConnection;
16 import java.net.URI; 17 import java.net.URI;
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 enterUploadErrorState(e); 281 enterUploadErrorState(e);
281 } 282 }
282 } 283 }
283 }; 284 };
284 this.mExecutor = executor; 285 this.mExecutor = executor;
285 this.mUrlConnection = urlConnection; 286 this.mUrlConnection = urlConnection;
286 this.mUploadProvider = provider; 287 this.mUploadProvider = provider;
287 } 288 }
288 289
289 @Override 290 @Override
291 @SuppressLint("DefaultLocale")
290 public void onReadSucceeded(final boolean finalChunk) { 292 public void onReadSucceeded(final boolean finalChunk) {
291 if (!mSinkState.compareAndSet(SinkState.AWAITING_READ_RESULT, SinkSt ate.UPLOADING)) { 293 if (!mSinkState.compareAndSet(SinkState.AWAITING_READ_RESULT, SinkSt ate.UPLOADING)) {
292 throw new IllegalStateException( 294 throw new IllegalStateException(
293 "Not expecting a read result, expecting: " + mSinkState. get()); 295 "Not expecting a read result, expecting: " + mSinkState. get());
294 } 296 }
295 mExecutor.execute(errorSetting(new CheckedRunnable() { 297 mExecutor.execute(errorSetting(new CheckedRunnable() {
296 @Override 298 @Override
297 public void run() throws Exception { 299 public void run() throws Exception {
298 mBuffer.flip(); 300 mBuffer.flip();
299 if (mTotalBytes != -1 && mTotalBytes - mWrittenBytes < mBuff er.remaining()) { 301 if (mTotalBytes != -1 && mTotalBytes - mWrittenBytes < mBuff er.remaining()) {
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 // Can't throw directly from here, since the delegate execut or could catch this 959 // Can't throw directly from here, since the delegate execut or could catch this
958 // exception. 960 // exception.
959 mExecutedInline = new InlineExecutionProhibitedException(); 961 mExecutedInline = new InlineExecutionProhibitedException();
960 return; 962 return;
961 } 963 }
962 mCommand.run(); 964 mCommand.run();
963 } 965 }
964 } 966 }
965 } 967 }
966 } 968 }
OLDNEW
« no previous file with comments | « no previous file | components/cronet/android/java/src/org/chromium/net/impl/CronetUploadDataStream.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698