| 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 #include "chrome/browser/profiles/profile_impl_io_data.h" | 5 #include "chrome/browser/profiles/profile_impl_io_data.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "chrome/common/chrome_constants.h" | 22 #include "chrome/common/chrome_constants.h" |
| 23 #include "chrome/common/chrome_switches.h" | 23 #include "chrome/common/chrome_switches.h" |
| 24 #include "chrome/common/pref_names.h" | 24 #include "chrome/common/pref_names.h" |
| 25 #include "chrome/common/url_constants.h" | 25 #include "chrome/common/url_constants.h" |
| 26 #include "content/public/browser/browser_thread.h" | 26 #include "content/public/browser/browser_thread.h" |
| 27 #include "content/public/browser/resource_context.h" | 27 #include "content/public/browser/resource_context.h" |
| 28 #include "net/base/server_bound_cert_service.h" | 28 #include "net/base/server_bound_cert_service.h" |
| 29 #include "net/ftp/ftp_network_layer.h" | 29 #include "net/ftp/ftp_network_layer.h" |
| 30 #include "net/http/http_cache.h" | 30 #include "net/http/http_cache.h" |
| 31 #include "net/url_request/url_request_job_factory.h" | 31 #include "net/url_request/url_request_job_factory.h" |
| 32 #include "net/url_request/url_request_throttler_manager.h" |
| 32 | 33 |
| 33 using content::BrowserThread; | 34 using content::BrowserThread; |
| 34 | 35 |
| 35 ProfileImplIOData::Handle::Handle(Profile* profile) | 36 ProfileImplIOData::Handle::Handle(Profile* profile) |
| 36 : io_data_(new ProfileImplIOData), | 37 : io_data_(new ProfileImplIOData), |
| 37 profile_(profile), | 38 profile_(profile), |
| 38 initialized_(false) { | 39 initialized_(false) { |
| 39 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 40 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 40 DCHECK(profile); | 41 DCHECK(profile); |
| 41 } | 42 } |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 main_context->set_http_auth_handler_factory( | 302 main_context->set_http_auth_handler_factory( |
| 302 io_thread_globals->http_auth_handler_factory.get()); | 303 io_thread_globals->http_auth_handler_factory.get()); |
| 303 media_request_context_->set_http_auth_handler_factory( | 304 media_request_context_->set_http_auth_handler_factory( |
| 304 io_thread_globals->http_auth_handler_factory.get()); | 305 io_thread_globals->http_auth_handler_factory.get()); |
| 305 | 306 |
| 306 main_context->set_fraudulent_certificate_reporter( | 307 main_context->set_fraudulent_certificate_reporter( |
| 307 fraudulent_certificate_reporter()); | 308 fraudulent_certificate_reporter()); |
| 308 media_request_context_->set_fraudulent_certificate_reporter( | 309 media_request_context_->set_fraudulent_certificate_reporter( |
| 309 fraudulent_certificate_reporter()); | 310 fraudulent_certificate_reporter()); |
| 310 | 311 |
| 312 main_context->set_throttler_manager( |
| 313 io_thread_globals->throttler_manager.get()); |
| 314 media_request_context_->set_throttler_manager( |
| 315 io_thread_globals->throttler_manager.get()); |
| 316 extensions_context->set_throttler_manager( |
| 317 io_thread_globals->throttler_manager.get()); |
| 318 |
| 311 main_context->set_proxy_service(proxy_service()); | 319 main_context->set_proxy_service(proxy_service()); |
| 312 media_request_context_->set_proxy_service(proxy_service()); | 320 media_request_context_->set_proxy_service(proxy_service()); |
| 313 | 321 |
| 314 scoped_refptr<net::CookieStore> cookie_store = NULL; | 322 scoped_refptr<net::CookieStore> cookie_store = NULL; |
| 315 net::ServerBoundCertService* server_bound_cert_service = NULL; | 323 net::ServerBoundCertService* server_bound_cert_service = NULL; |
| 316 if (record_mode || playback_mode) { | 324 if (record_mode || playback_mode) { |
| 317 // Don't use existing cookies and use an in-memory store. | 325 // Don't use existing cookies and use an in-memory store. |
| 318 cookie_store = new net::CookieMonster( | 326 cookie_store = new net::CookieMonster( |
| 319 NULL, profile_params->cookie_monster_delegate); | 327 NULL, profile_params->cookie_monster_delegate); |
| 320 // Don't use existing server-bound certs and use an in-memory store. | 328 // Don't use existing server-bound certs and use an in-memory store. |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 void ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread( | 517 void ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread( |
| 510 base::Time time) { | 518 base::Time time) { |
| 511 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 519 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 512 LazyInitialize(); | 520 LazyInitialize(); |
| 513 | 521 |
| 514 DCHECK(transport_security_state()); | 522 DCHECK(transport_security_state()); |
| 515 transport_security_state()->DeleteSince(time); | 523 transport_security_state()->DeleteSince(time); |
| 516 DCHECK(http_server_properties_manager()); | 524 DCHECK(http_server_properties_manager()); |
| 517 http_server_properties_manager()->Clear(); | 525 http_server_properties_manager()->Clear(); |
| 518 } | 526 } |
| OLD | NEW |