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

Side by Side Diff: components/cronet/android/test/quic_test_server.cc

Issue 1817553002: Add host resolver rules experimental flag for Cronet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: delete unused definitions, rebase, and fix test Created 4 years, 4 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 #include "quic_test_server.h" 5 #include "quic_test_server.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/android/path_utils.h" 9 #include "base/android/path_utils.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 } 96 }
97 97
98 void ShutdownQuicTestServer(JNIEnv* env, 98 void ShutdownQuicTestServer(JNIEnv* env,
99 const JavaParamRef<jclass>& /*jcaller*/) { 99 const JavaParamRef<jclass>& /*jcaller*/) {
100 DCHECK(!g_quic_server_thread->task_runner()->BelongsToCurrentThread()); 100 DCHECK(!g_quic_server_thread->task_runner()->BelongsToCurrentThread());
101 g_quic_server_thread->task_runner()->PostTask( 101 g_quic_server_thread->task_runner()->PostTask(
102 FROM_HERE, base::Bind(&ShutdownOnServerThread)); 102 FROM_HERE, base::Bind(&ShutdownOnServerThread));
103 delete g_quic_server_thread; 103 delete g_quic_server_thread;
104 } 104 }
105 105
106 ScopedJavaLocalRef<jstring> GetServerHost(
107 JNIEnv* env,
108 const JavaParamRef<jclass>& /*jcaller*/) {
109 return base::android::ConvertUTF8ToJavaString(env, kFakeQuicDomain);
110 }
111
112 int GetServerPort(JNIEnv* env, const JavaParamRef<jclass>& /*jcaller*/) { 106 int GetServerPort(JNIEnv* env, const JavaParamRef<jclass>& /*jcaller*/) {
113 return kServerPort; 107 return kServerPort;
114 } 108 }
115 109
116 bool RegisterQuicTestServer(JNIEnv* env) { 110 bool RegisterQuicTestServer(JNIEnv* env) {
117 return RegisterNativesImpl(env); 111 return RegisterNativesImpl(env);
118 } 112 }
119 113
120 } // namespace cronet 114 } // namespace cronet
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698