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

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: Initialize boolean to false 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 ba9b30b4f0f789aae8664651339132f62c3b4a8f..059f30713936b85fff529256de21291d2012323d 100644
--- a/components/cronet/android/url_request_context_adapter.h
+++ b/components/cronet/android/url_request_context_adapter.h
@@ -24,6 +24,8 @@ namespace net {
class NetLogLogger;
+class ProxyConfigService;
+
} // namespace net
namespace cronet {
@@ -82,6 +84,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_;
@@ -90,15 +95,17 @@ 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_;
- bool is_context_initialized_;
+ bool is_context_initialized_ = false;
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