OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_IO_THREAD_H_ | 5 #ifndef CHROME_BROWSER_IO_THREAD_H_ |
6 #define CHROME_BROWSER_IO_THREAD_H_ | 6 #define CHROME_BROWSER_IO_THREAD_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 // ProxyService, since we always directly connect to fetch the PAC script. | 148 // ProxyService, since we always directly connect to fetch the PAC script. |
149 scoped_ptr<net::URLRequestContext> proxy_script_fetcher_context; | 149 scoped_ptr<net::URLRequestContext> proxy_script_fetcher_context; |
150 scoped_ptr<net::ProxyService> system_proxy_service; | 150 scoped_ptr<net::ProxyService> system_proxy_service; |
151 scoped_ptr<net::HttpTransactionFactory> system_http_transaction_factory; | 151 scoped_ptr<net::HttpTransactionFactory> system_http_transaction_factory; |
152 scoped_ptr<net::URLRequestJobFactory> system_url_request_job_factory; | 152 scoped_ptr<net::URLRequestJobFactory> system_url_request_job_factory; |
153 scoped_ptr<net::URLRequestContext> system_request_context; | 153 scoped_ptr<net::URLRequestContext> system_request_context; |
154 SystemRequestContextLeakChecker system_request_context_leak_checker; | 154 SystemRequestContextLeakChecker system_request_context_leak_checker; |
155 // |system_cookie_store| and |system_server_bound_cert_service| are shared | 155 // |system_cookie_store| and |system_server_bound_cert_service| are shared |
156 // between |proxy_script_fetcher_context| and |system_request_context|. | 156 // between |proxy_script_fetcher_context| and |system_request_context|. |
157 scoped_refptr<net::CookieStore> system_cookie_store; | 157 scoped_refptr<net::CookieStore> system_cookie_store; |
| 158 #if defined(ENABLE_EXTENSIONS) |
158 scoped_refptr<extensions::EventRouterForwarder> | 159 scoped_refptr<extensions::EventRouterForwarder> |
159 extension_event_router_forwarder; | 160 extension_event_router_forwarder; |
| 161 #endif |
160 scoped_ptr<net::HostMappingRules> host_mapping_rules; | 162 scoped_ptr<net::HostMappingRules> host_mapping_rules; |
161 scoped_ptr<net::HttpUserAgentSettings> http_user_agent_settings; | 163 scoped_ptr<net::HttpUserAgentSettings> http_user_agent_settings; |
162 bool ignore_certificate_errors; | 164 bool ignore_certificate_errors; |
163 uint16 testing_fixed_http_port; | 165 uint16 testing_fixed_http_port; |
164 uint16 testing_fixed_https_port; | 166 uint16 testing_fixed_https_port; |
165 | 167 |
166 Optional<size_t> initial_max_spdy_concurrent_streams; | 168 Optional<size_t> initial_max_spdy_concurrent_streams; |
167 Optional<bool> force_spdy_single_domain; | 169 Optional<bool> force_spdy_single_domain; |
168 Optional<bool> enable_spdy_compression; | 170 Optional<bool> enable_spdy_compression; |
169 Optional<bool> enable_spdy_ping_based_connection_checking; | 171 Optional<bool> enable_spdy_ping_based_connection_checking; |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 net::SSLConfigService* GetSSLConfigService(); | 300 net::SSLConfigService* GetSSLConfigService(); |
299 | 301 |
300 void ChangedToOnTheRecordOnIOThread(); | 302 void ChangedToOnTheRecordOnIOThread(); |
301 | 303 |
302 void UpdateDnsClientEnabled(); | 304 void UpdateDnsClientEnabled(); |
303 | 305 |
304 // Configures QUIC options based on the flags in |command_line| as | 306 // Configures QUIC options based on the flags in |command_line| as |
305 // well as the QUIC field trial group. | 307 // well as the QUIC field trial group. |
306 void ConfigureQuic(const base::CommandLine& command_line); | 308 void ConfigureQuic(const base::CommandLine& command_line); |
307 | 309 |
| 310 extensions::EventRouterForwarder* extension_event_router_forwarder() { |
| 311 #if defined(ENABLE_EXTENSIONS) |
| 312 return extension_event_router_forwarder_; |
| 313 #else |
| 314 return NULL; |
| 315 #endif |
| 316 } |
308 // Configures QUIC options in |globals| based on the flags in |command_line| | 317 // Configures QUIC options in |globals| based on the flags in |command_line| |
309 // as well as the QUIC field trial group and parameters. | 318 // as well as the QUIC field trial group and parameters. |
310 static void ConfigureQuicGlobals( | 319 static void ConfigureQuicGlobals( |
311 const base::CommandLine& command_line, | 320 const base::CommandLine& command_line, |
312 base::StringPiece quic_trial_group, | 321 base::StringPiece quic_trial_group, |
313 const VariationParameters& quic_trial_params, | 322 const VariationParameters& quic_trial_params, |
314 Globals* globals); | 323 Globals* globals); |
315 | 324 |
316 // Returns true if QUIC should be enabled, either as a result | 325 // Returns true if QUIC should be enabled, either as a result |
317 // of a field trial or a command line flag. | 326 // of a field trial or a command line flag. |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 // Returns the alternate protocol probability threshold specified by | 381 // Returns the alternate protocol probability threshold specified by |
373 // any flags in |command_line| or |quic_trial_params|. | 382 // any flags in |command_line| or |quic_trial_params|. |
374 static double GetAlternateProtocolProbabilityThreshold( | 383 static double GetAlternateProtocolProbabilityThreshold( |
375 const base::CommandLine& command_line, | 384 const base::CommandLine& command_line, |
376 const VariationParameters& quic_trial_params); | 385 const VariationParameters& quic_trial_params); |
377 | 386 |
378 // The NetLog is owned by the browser process, to allow logging from other | 387 // The NetLog is owned by the browser process, to allow logging from other |
379 // threads during shutdown, but is used most frequently on the IOThread. | 388 // threads during shutdown, but is used most frequently on the IOThread. |
380 ChromeNetLog* net_log_; | 389 ChromeNetLog* net_log_; |
381 | 390 |
| 391 #if defined(ENABLE_EXTENSIONS) |
382 // The extensions::EventRouterForwarder allows for sending events to | 392 // The extensions::EventRouterForwarder allows for sending events to |
383 // extensions from the IOThread. | 393 // extensions from the IOThread. |
384 extensions::EventRouterForwarder* extension_event_router_forwarder_; | 394 extensions::EventRouterForwarder* extension_event_router_forwarder_; |
| 395 #endif |
385 | 396 |
386 // These member variables are basically global, but their lifetimes are tied | 397 // These member variables are basically global, but their lifetimes are tied |
387 // to the IOThread. IOThread owns them all, despite not using scoped_ptr. | 398 // to the IOThread. IOThread owns them all, despite not using scoped_ptr. |
388 // This is because the destructor of IOThread runs on the wrong thread. All | 399 // This is because the destructor of IOThread runs on the wrong thread. All |
389 // member variables should be deleted in CleanUp(). | 400 // member variables should be deleted in CleanUp(). |
390 | 401 |
391 // These member variables are initialized in Init() and do not change for the | 402 // These member variables are initialized in Init() and do not change for the |
392 // lifetime of the IO thread. | 403 // lifetime of the IO thread. |
393 | 404 |
394 Globals* globals_; | 405 Globals* globals_; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 bool is_spdy_disabled_by_policy_; | 439 bool is_spdy_disabled_by_policy_; |
429 | 440 |
430 base::WeakPtrFactory<IOThread> weak_factory_; | 441 base::WeakPtrFactory<IOThread> weak_factory_; |
431 | 442 |
432 const base::TimeTicks creation_time_; | 443 const base::TimeTicks creation_time_; |
433 | 444 |
434 DISALLOW_COPY_AND_ASSIGN(IOThread); | 445 DISALLOW_COPY_AND_ASSIGN(IOThread); |
435 }; | 446 }; |
436 | 447 |
437 #endif // CHROME_BROWSER_IO_THREAD_H_ | 448 #endif // CHROME_BROWSER_IO_THREAD_H_ |
OLD | NEW |