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

Unified Diff: components/cronet/android/test/test_upload_data_stream_handler.h

Issue 2406273002: [Cronet] Test the libcronet that's shipped, not libcronet_test (Closed)
Patch Set: fix shutdown race Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: components/cronet/android/test/test_upload_data_stream_handler.h
diff --git a/components/cronet/android/test/test_upload_data_stream_handler.h b/components/cronet/android/test/test_upload_data_stream_handler.h
index 65ec29c45f76a8673fed6c139baf46d0fcb94c76..acf0c64a3f50f29ba7a2d431c81ac78e03dbe4ca 100644
--- a/components/cronet/android/test/test_upload_data_stream_handler.h
+++ b/components/cronet/android/test/test_upload_data_stream_handler.h
@@ -12,7 +12,7 @@
#include "base/android/scoped_java_ref.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "base/threading/thread.h"
+#include "base/single_thread_task_runner.h"
#include "net/base/io_buffer.h"
#include "net/base/upload_data_stream.h"
@@ -27,7 +27,8 @@ class TestUploadDataStreamHandler {
TestUploadDataStreamHandler(
std::unique_ptr<net::UploadDataStream> upload_data_stream,
JNIEnv* env,
- jobject jtest_upload_data_stream_handler);
+ jobject jtest_upload_data_stream_handler,
+ jlong jcontext_adapter);
~TestUploadDataStreamHandler();
@@ -86,7 +87,7 @@ class TestUploadDataStreamHandler {
// Created and destroyed on the same Java thread. This is where methods of
// net::UploadDataStream run on.
- std::unique_ptr<base::Thread> network_thread_;
+ scoped_refptr<base::SingleThreadTaskRunner> network_thread_;
// Created on a Java thread. Accessed only on |network_thread_|.
std::unique_ptr<net::UploadDataStream> upload_data_stream_;
// Created and accessed only on |network_thread_|.

Powered by Google App Engine
This is Rietveld 408576698