| Index: components/cronet/android/cronet_url_request_context_adapter.h
|
| diff --git a/components/cronet/android/cronet_url_request_context_adapter.h b/components/cronet/android/cronet_url_request_context_adapter.h
|
| index 31de6d93222f0dd69f73721a2688184c5caba75a..7a412755f47bc5c12178945ac9fb825694bf5e8d 100644
|
| --- a/components/cronet/android/cronet_url_request_context_adapter.h
|
| +++ b/components/cronet/android/cronet_url_request_context_adapter.h
|
| @@ -5,6 +5,7 @@
|
| #ifndef COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_CONTEXT_ADAPTER_H_
|
| #define COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_CONTEXT_ADAPTER_H_
|
|
|
| +#include <jni.h>
|
| #include <queue>
|
| #include <string>
|
|
|
| @@ -13,8 +14,6 @@
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/threading/thread.h"
|
| -#include "net/base/net_log.h"
|
| -#include "net/base/network_change_notifier.h"
|
|
|
| namespace base {
|
| class SingleThreadTaskRunner;
|
| @@ -28,6 +27,8 @@ class ProxyConfigService;
|
|
|
| namespace cronet {
|
|
|
| +bool CronetUrlRequestContextAdapterRegisterJni(JNIEnv* env);
|
| +
|
| struct URLRequestContextConfig;
|
|
|
| // Adapter between Java CronetUrlRequestContext and net::URLRequestContext.
|
| @@ -39,12 +40,11 @@ class CronetURLRequestContextAdapter {
|
| ~CronetURLRequestContextAdapter();
|
|
|
| // Called on main Java thread to initialize URLRequestContext.
|
| - void InitRequestContextOnMainThread(
|
| - const base::Closure& java_init_network_thread);
|
| + void InitRequestContextOnMainThread(JNIEnv* env, jobject jcaller);
|
|
|
| // Releases all resources for the request context and deletes the object.
|
| // Blocks until network thread is destroyed after running all pending tasks.
|
| - void Destroy();
|
| + void Destroy(JNIEnv* env, jobject jcaller);
|
|
|
| // Posts a task that might depend on the context being initialized
|
| // to the network thread.
|
| @@ -55,9 +55,9 @@ class CronetURLRequestContextAdapter {
|
|
|
| net::URLRequestContext* GetURLRequestContext();
|
|
|
| - void StartNetLogToFile(const std::string& file_name);
|
| + void StartNetLogToFile(JNIEnv* env, jobject jcaller, jstring jfile_name);
|
|
|
| - void StopNetLog();
|
| + void StopNetLog(JNIEnv* env, jobject jcaller);
|
|
|
| // Default net::LOAD flags used to create requests.
|
| int default_load_flags() const { return default_load_flags_; }
|
|
|