Index: chromecast/shell/browser/url_request_context_factory.h |
diff --git a/chromecast/shell/browser/url_request_context_factory.h b/chromecast/shell/browser/url_request_context_factory.h |
index 8de7437b93e322dbdbfcc61745d4a120741885bb..439a56cf90544a0d9107e58dcab1f97140d73df7 100644 |
--- a/chromecast/shell/browser/url_request_context_factory.h |
+++ b/chromecast/shell/browser/url_request_context_factory.h |
@@ -17,6 +17,7 @@ class URLRequestJobFactory; |
namespace chromecast { |
namespace shell { |
+class CastNetworkDelegate; |
class URLRequestContextFactory { |
public: |
@@ -43,6 +44,14 @@ class URLRequestContextFactory { |
net::URLRequestContextGetter* GetMainGetter(); |
net::URLRequestContextGetter* GetMediaGetter(); |
+ CastNetworkDelegate* app_network_delegate() const { |
+ return app_network_delegate_.get(); |
+ } |
+ |
+ // Initialize the CastNetworkDelegate objects. This needs to be done |
+ // after the CastService is created, but before any URL requests are made. |
+ void InitializeNetworkDelegates(); |
+ |
private: |
class URLRequestContextGetter; |
class MainURLRequestContextGetter; |
@@ -72,6 +81,8 @@ class URLRequestContextFactory { |
scoped_refptr<net::URLRequestContextGetter> system_getter_; |
scoped_refptr<net::URLRequestContextGetter> media_getter_; |
scoped_refptr<net::URLRequestContextGetter> main_getter_; |
+ scoped_ptr<CastNetworkDelegate> app_network_delegate_; |
+ scoped_ptr<CastNetworkDelegate> system_network_delegate_; |
// Shared objects for all contexts. |
// The URLRequestContextStorage class is not used as owner to these objects |