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

Side by Side Diff: chrome/browser/net/chrome_url_request_context.h

Issue 848006: Generalize the net module's LoadLog facility from a passive container, to an event stream (NetLog). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Split up RequestTracker into ConnectJobTracker+RequestTracker+RequestTrackerBase, address comments Created 10 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/net/chrome_net_log.cc ('k') | chrome/browser/net/chrome_url_request_context.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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ 5 #ifndef CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_
6 #define CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ 6 #define CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_
7 7
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/linked_ptr.h" 9 #include "base/linked_ptr.h"
10 #include "net/base/cookie_policy.h" 10 #include "net/base/cookie_policy.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 } 194 }
195 void set_host_zoom_map(HostZoomMap* host_zoom_map) { 195 void set_host_zoom_map(HostZoomMap* host_zoom_map) {
196 host_zoom_map_ = host_zoom_map; 196 host_zoom_map_ = host_zoom_map;
197 } 197 }
198 void set_privacy_blacklist(Blacklist* privacy_blacklist) { 198 void set_privacy_blacklist(Blacklist* privacy_blacklist) {
199 privacy_blacklist_ = privacy_blacklist; 199 privacy_blacklist_ = privacy_blacklist;
200 } 200 }
201 void set_appcache_service(ChromeAppCacheService* service) { 201 void set_appcache_service(ChromeAppCacheService* service) {
202 appcache_service_ = service; 202 appcache_service_ = service;
203 } 203 }
204 void set_net_log(net::NetLog* net_log) {
205 net_log_ = net_log;
206 }
204 207
205 // Callback for when the accept language changes. 208 // Callback for when the accept language changes.
206 void OnAcceptLanguageChange(const std::string& accept_language); 209 void OnAcceptLanguageChange(const std::string& accept_language);
207 210
208 // Callback for when the default charset changes. 211 // Callback for when the default charset changes.
209 void OnDefaultCharsetChange(const std::string& default_charset); 212 void OnDefaultCharsetChange(const std::string& default_charset);
210 213
211 protected: 214 protected:
212 ExtensionInfoMap extension_info_; 215 ExtensionInfoMap extension_info_;
213 216
214 // Path to the directory user scripts are stored in. 217 // Path to the directory user scripts are stored in.
215 FilePath user_script_dir_path_; 218 FilePath user_script_dir_path_;
216 219
217 scoped_refptr<ChromeAppCacheService> appcache_service_; 220 scoped_refptr<ChromeAppCacheService> appcache_service_;
218 scoped_refptr<ChromeCookiePolicy> chrome_cookie_policy_; 221 scoped_refptr<ChromeCookiePolicy> chrome_cookie_policy_;
219 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; 222 scoped_refptr<HostContentSettingsMap> host_content_settings_map_;
220 scoped_refptr<HostZoomMap> host_zoom_map_; 223 scoped_refptr<HostZoomMap> host_zoom_map_;
221 scoped_refptr<Blacklist> privacy_blacklist_; 224 scoped_refptr<Blacklist> privacy_blacklist_;
222 225
223 bool is_media_; 226 bool is_media_;
224 bool is_off_the_record_; 227 bool is_off_the_record_;
225 228
226 private: 229 private:
227 // Blacklist implementation of InterceptRequestCookie and 230 // Blacklist implementation of InterceptRequestCookie and
228 // InterceptResponseCookie. Returns true if cookies are allowed and false 231 // InterceptResponseCookie. Returns true if cookies are allowed and false
229 // if the request matches a Blacklist rule and cookies should be blocked. 232 // if the request matches a Blacklist rule and cookies should be blocked.
230 bool InterceptCookie(const URLRequest* request, 233 bool InterceptCookie(const URLRequest* request,
231 const std::string& cookie) const; 234 const std::string& cookie) const;
232 235
233 // Filter for url_request_tracker(), that prevents "chrome://" requests from
234 // being tracked by "about:net-internals".
235 static bool ShouldTrackRequest(const GURL& url);
236
237 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContext); 236 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContext);
238 }; 237 };
239 238
240 // A URLRequestContextGetter subclass used by the browser. This returns a 239 // A URLRequestContextGetter subclass used by the browser. This returns a
241 // subclass of URLRequestContext which can be used to store extra information 240 // subclass of URLRequestContext which can be used to store extra information
242 // about requests. 241 // about requests.
243 // 242 //
244 // Most methods are expected to be called on the UI thread, except for 243 // Most methods are expected to be called on the UI thread, except for
245 // the destructor and GetURLRequestContext(). 244 // the destructor and GetURLRequestContext().
246 class ChromeURLRequestContextGetter : public URLRequestContextGetter, 245 class ChromeURLRequestContextGetter : public URLRequestContextGetter,
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 IOThread* const io_thread_; 391 IOThread* const io_thread_;
393 392
394 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextFactory); 393 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextFactory);
395 }; 394 };
396 395
397 // Creates a proxy configuration using the overrides specified on the command 396 // Creates a proxy configuration using the overrides specified on the command
398 // line. Returns NULL if the system defaults should be used instead. 397 // line. Returns NULL if the system defaults should be used instead.
399 net::ProxyConfig* CreateProxyConfig(const CommandLine& command_line); 398 net::ProxyConfig* CreateProxyConfig(const CommandLine& command_line);
400 399
401 #endif // CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ 400 #endif // CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_
OLDNEW
« no previous file with comments | « chrome/browser/net/chrome_net_log.cc ('k') | chrome/browser/net/chrome_url_request_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698