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

Side by Side Diff: components/cronet/android/test/javatests/src/org/chromium/net/TestDataProvider.java

Issue 1307863006: [Cronet] Change interface APIs to abstract classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update CronetPerfTestActivity too Created 5 years, 3 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
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 java.io.IOException; 7 import java.io.IOException;
8 import java.nio.ByteBuffer; 8 import java.nio.ByteBuffer;
9 import java.util.ArrayList; 9 import java.util.ArrayList;
10 import java.util.concurrent.Executor; 10 import java.util.concurrent.Executor;
11 11
12 /** 12 /**
13 * An UploadDataProvider implementation used in tests. 13 * An UploadDataProvider implementation used in tests.
14 */ 14 */
15 class TestUploadDataProvider implements UploadDataProvider { 15 class TestUploadDataProvider extends UploadDataProvider {
16 // Indicates whether all success callbacks are synchronous or asynchronous. 16 // Indicates whether all success callbacks are synchronous or asynchronous.
17 // Doesn't apply to errors. 17 // Doesn't apply to errors.
18 enum SuccessCallbackMode { 18 enum SuccessCallbackMode {
19 SYNC, 19 SYNC,
20 ASYNC 20 ASYNC
21 }; 21 };
22 22
23 // Indicates whether failures should throw exceptions, invoke callbacks 23 // Indicates whether failures should throw exceptions, invoke callbacks
24 // synchronously, or invoke callback asynchronously. 24 // synchronously, or invoke callback asynchronously.
25 enum FailMode { 25 enum FailMode {
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 "Async rewind failure")); 235 "Async rewind failure"));
236 } 236 }
237 }; 237 };
238 mExecutor.execute(errorRunnable); 238 mExecutor.execute(errorRunnable);
239 return true; 239 return true;
240 default: 240 default:
241 return false; 241 return false;
242 } 242 }
243 } 243 }
244 } 244 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698