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

Side by Side Diff: chromecast/browser/url_request_context_factory.h

Issue 1216443002: [Chromecast] Add net logging. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « chromecast/browser/cast_net_log.cc ('k') | chromecast/browser/url_request_context_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROMECAST_BROWSER_URL_REQUEST_CONTEXT_FACTORY_H_ 5 #ifndef CHROMECAST_BROWSER_URL_REQUEST_CONTEXT_FACTORY_H_
6 #define CHROMECAST_BROWSER_URL_REQUEST_CONTEXT_FACTORY_H_ 6 #define CHROMECAST_BROWSER_URL_REQUEST_CONTEXT_FACTORY_H_
7 7
8 #include "content/public/browser/content_browser_client.h" 8 #include "content/public/browser/content_browser_client.h"
9 #include "net/http/http_network_session.h" 9 #include "net/http/http_network_session.h"
10 10
11 namespace net { 11 namespace net {
12 class HttpTransactionFactory; 12 class HttpTransactionFactory;
13 class HttpUserAgentSettings; 13 class HttpUserAgentSettings;
14 class NetLog;
14 class ProxyConfigService; 15 class ProxyConfigService;
15 class URLRequestJobFactory; 16 class URLRequestJobFactory;
16 } // namespace net 17 } // namespace net
17 18
18 namespace chromecast { 19 namespace chromecast {
19 namespace shell { 20 namespace shell {
20 class CastNetworkDelegate; 21 class CastNetworkDelegate;
21 22
22 class URLRequestContextFactory { 23 class URLRequestContextFactory {
23 public: 24 public:
24 URLRequestContextFactory(); 25 URLRequestContextFactory();
25 ~URLRequestContextFactory(); 26 ~URLRequestContextFactory();
26 27
27 // Some members must be initialized on UI thread. 28 // Some members must be initialized on UI thread.
28 void InitializeOnUIThread(); 29 void InitializeOnUIThread(net::NetLog* net_log);
29 30
30 // Since main context requires a bunch of input params, if these get called 31 // Since main context requires a bunch of input params, if these get called
31 // multiple times, either multiple main contexts should be supported/managed 32 // multiple times, either multiple main contexts should be supported/managed
32 // or the input params need to be the same as before. So to be safe, 33 // or the input params need to be the same as before. So to be safe,
33 // the CreateMainGetter function currently DCHECK to make sure it is not 34 // the CreateMainGetter function currently DCHECK to make sure it is not
34 // called more than once. 35 // called more than once.
35 // The media and system getters however, do not need input, so it is actually 36 // The media and system getters however, do not need input, so it is actually
36 // safe to call these multiple times. The impl create only 1 getter of each 37 // safe to call these multiple times. The impl create only 1 getter of each
37 // type and return the same instance each time the methods are called, thus 38 // type and return the same instance each time the methods are called, thus
38 // the name difference. 39 // the name difference.
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 scoped_ptr<net::HttpUserAgentSettings> http_user_agent_settings_; 107 scoped_ptr<net::HttpUserAgentSettings> http_user_agent_settings_;
107 scoped_ptr<net::HttpTransactionFactory> system_transaction_factory_; 108 scoped_ptr<net::HttpTransactionFactory> system_transaction_factory_;
108 scoped_ptr<net::URLRequestJobFactory> system_job_factory_; 109 scoped_ptr<net::URLRequestJobFactory> system_job_factory_;
109 110
110 bool main_dependencies_initialized_; 111 bool main_dependencies_initialized_;
111 scoped_ptr<net::HttpTransactionFactory> main_transaction_factory_; 112 scoped_ptr<net::HttpTransactionFactory> main_transaction_factory_;
112 scoped_ptr<net::URLRequestJobFactory> main_job_factory_; 113 scoped_ptr<net::URLRequestJobFactory> main_job_factory_;
113 114
114 bool media_dependencies_initialized_; 115 bool media_dependencies_initialized_;
115 scoped_ptr<net::HttpTransactionFactory> media_transaction_factory_; 116 scoped_ptr<net::HttpTransactionFactory> media_transaction_factory_;
117
118 net::NetLog* net_log_;
116 }; 119 };
117 120
118 } // namespace shell 121 } // namespace shell
119 } // namespace chromecast 122 } // namespace chromecast
120 123
121 #endif // CHROMECAST_BROWSER_URL_REQUEST_CONTEXT_FACTORY_H_ 124 #endif // CHROMECAST_BROWSER_URL_REQUEST_CONTEXT_FACTORY_H_
OLDNEW
« no previous file with comments | « chromecast/browser/cast_net_log.cc ('k') | chromecast/browser/url_request_context_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698