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

Unified Diff: components/cronet/android/url_request_context_adapter.h

Issue 624443003: Setup ProxyConfigServiceAndroid in Cronet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Matt's comments Created 6 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 side-by-side diff with in-line comments
Download patch
Index: components/cronet/android/url_request_context_adapter.h
diff --git a/components/cronet/android/url_request_context_adapter.h b/components/cronet/android/url_request_context_adapter.h
index b84e036f3cb476e8d70acfa6164c7eef4f94da47..d03ec4b53dffcc78af2a016a6d462fb7762fe0ed 100644
--- a/components/cronet/android/url_request_context_adapter.h
+++ b/components/cronet/android/url_request_context_adapter.h
@@ -17,6 +17,7 @@
#include "base/threading/thread.h"
#include "net/base/net_log.h"
#include "net/base/network_change_notifier.h"
+#include "net/proxy/proxy_config_service.h"
mef 2014/10/15 20:04:55 I think you should be able to forward-declare net:
xunjieli 2014/10/15 20:27:46 Done.
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
@@ -80,6 +81,9 @@ class URLRequestContextAdapter : public net::URLRequestContextGetter {
void StartNetLogToFile(const std::string& file_name);
void StopNetLog();
+ // Called on main Java thread to initialize URLRequestContext.
+ void InitRequestContextOnMainThread();
+
private:
scoped_refptr<URLRequestContextAdapterDelegate> delegate_;
scoped_ptr<net::URLRequestContext> context_;
@@ -88,6 +92,8 @@ class URLRequestContextAdapter : public net::URLRequestContextGetter {
scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_;
scoped_ptr<NetLogObserver> net_log_observer_;
scoped_ptr<net::NetLogLogger> net_log_logger_;
+ scoped_ptr<net::ProxyConfigService> proxy_config_service_;
+ scoped_ptr<URLRequestContextConfig> config_;
// A queue of tasks that need to be run after context has been initialized.
std::queue<RunAfterContextInitTask> tasks_waiting_for_context_;
@@ -96,7 +102,7 @@ class URLRequestContextAdapter : public net::URLRequestContextGetter {
virtual ~URLRequestContextAdapter();
// Initializes |context_| on the Network thread.
- void InitializeURLRequestContext(scoped_ptr<URLRequestContextConfig> config);
+ void InitRequestContextOnNetworkThread();
// Helper function to start writing NetLog data to file. This should only be
// run after context is initialized.

Powered by Google App Engine
This is Rietveld 408576698