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

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: removes gyp dep 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 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
« no previous file with comments | « chromecast/shell/browser/cast_network_delegate_simple.cc ('k') | chromecast/shell/browser/url_request_context_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698