Upstream version 11.39.250.0
[platform/framework/web/crosswalk.git] / src / android_webview / browser / net / aw_url_request_context_getter.h
index 712893a..3154b52 100644 (file)
 #include "base/memory/scoped_ptr.h"
 #include "content/public/browser/content_browser_client.h"
 #include "net/http/http_network_session.h"
-#include "net/ssl/channel_id_service.h"
 #include "net/url_request/url_request_context_getter.h"
 #include "net/url_request/url_request_job_factory.h"
 
 namespace net {
 class CookieStore;
 class HttpTransactionFactory;
+class NetLog;
 class ProxyConfigService;
 class URLRequestContext;
 class URLRequestJobFactory;
@@ -40,8 +40,6 @@ class AwURLRequestContextGetter : public net::URLRequestContextGetter {
       scoped_ptr<data_reduction_proxy::DataReductionProxyConfigService>
           config_service);
 
-  void InitializeOnNetworkThread();
-
   // net::URLRequestContextGetter implementation.
   virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE;
   virtual scoped_refptr<base::SingleThreadTaskRunner>
@@ -50,6 +48,14 @@ class AwURLRequestContextGetter : public net::URLRequestContextGetter {
   data_reduction_proxy::DataReductionProxyAuthRequestHandler*
       GetDataReductionProxyAuthRequestHandler() const;
 
+  // NetLog is thread-safe, so clients can call this method from arbitrary
+  // threads (UI and IO).
+  net::NetLog* GetNetLog();
+
+  // This should be called before the network stack is ever used. It can be
+  // called again afterwards if the key updates.
+  void SetKeyOnIO(const std::string& key);
+
  private:
   friend class AwBrowserContext;
   virtual ~AwURLRequestContextGetter();
@@ -68,6 +74,7 @@ class AwURLRequestContextGetter : public net::URLRequestContextGetter {
 
   const base::FilePath partition_path_;
   scoped_refptr<net::CookieStore> cookie_store_;
+  scoped_ptr<net::NetLog> net_log_;
   scoped_ptr<net::URLRequestContext> url_request_context_;
   scoped_ptr<data_reduction_proxy::DataReductionProxyConfigService>
       data_reduction_proxy_config_service_;
@@ -75,7 +82,6 @@ class AwURLRequestContextGetter : public net::URLRequestContextGetter {
       data_reduction_proxy_auth_request_handler_;
   scoped_ptr<net::URLRequestJobFactory> job_factory_;
   scoped_ptr<net::HttpTransactionFactory> main_http_factory_;
-  scoped_ptr<net::ChannelIDService> channel_id_service_;
 
   // ProtocolHandlers and interceptors are stored here between
   // SetHandlersAndInterceptors() and the first GetURLRequestContext() call.