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

Unified Diff: chromecast/shell/browser/url_request_context_factory.h

Issue 598303002: Chromecast: adds CastNetworkDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: uploads CastNetworkDelegate :) Created 6 years, 3 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: 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

Powered by Google App Engine
This is Rietveld 408576698