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 304cdea6b051ef8fa4c087a847388fd1f411cf8b..0509d163e8521c701317195b2db571a092a09eab 100644 |
--- a/chromecast/shell/browser/url_request_context_factory.h |
+++ b/chromecast/shell/browser/url_request_context_factory.h |
@@ -16,6 +16,8 @@ class URLRequestJobFactory; |
} // namespace net |
namespace chromecast { |
+class CastNetworkDelegate; |
+ |
namespace shell { |
class URLRequestContextFactory { |
@@ -43,6 +45,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 +82,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 |