OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_io_data.h" | 5 #include "chrome/browser/profiles/profile_io_data.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 prerender_manager_ = profile_params_->prerender_manager; | 481 prerender_manager_ = profile_params_->prerender_manager; |
482 | 482 |
483 resource_context_.set_host_resolver(io_thread_globals->host_resolver.get()); | 483 resource_context_.set_host_resolver(io_thread_globals->host_resolver.get()); |
484 resource_context_.set_request_context(main_request_context_); | 484 resource_context_.set_request_context(main_request_context_); |
485 resource_context_.set_database_tracker(database_tracker_); | 485 resource_context_.set_database_tracker(database_tracker_); |
486 resource_context_.set_appcache_service(appcache_service_); | 486 resource_context_.set_appcache_service(appcache_service_); |
487 resource_context_.set_blob_storage_context(blob_storage_context_); | 487 resource_context_.set_blob_storage_context(blob_storage_context_); |
488 resource_context_.set_file_system_context(file_system_context_); | 488 resource_context_.set_file_system_context(file_system_context_); |
489 resource_context_.set_quota_manager(quota_manager_); | 489 resource_context_.set_quota_manager(quota_manager_); |
490 resource_context_.set_host_zoom_map(host_zoom_map_); | 490 resource_context_.set_host_zoom_map(host_zoom_map_); |
491 resource_context_.set_extension_info_map(extension_info_map_); | |
492 resource_context_.set_prerender_manager(prerender_manager_); | 491 resource_context_.set_prerender_manager(prerender_manager_); |
493 resource_context_.SetUserData(NULL, const_cast<ProfileIOData*>(this)); | 492 resource_context_.SetUserData(NULL, const_cast<ProfileIOData*>(this)); |
494 | 493 |
495 LazyInitializeInternal(profile_params_.get()); | 494 LazyInitializeInternal(profile_params_.get()); |
496 | 495 |
497 profile_params_.reset(); | 496 profile_params_.reset(); |
498 initialized_ = true; | 497 initialized_ = true; |
499 } | 498 } |
500 | 499 |
501 void ProfileIOData::ApplyProfileParamsToContext( | 500 void ProfileIOData::ApplyProfileParamsToContext( |
502 ChromeURLRequestContext* context) const { | 501 ChromeURLRequestContext* context) const { |
503 context->set_is_incognito(profile_params_->is_incognito); | 502 context->set_is_incognito(profile_params_->is_incognito); |
504 context->set_accept_language(profile_params_->accept_language); | 503 context->set_accept_language(profile_params_->accept_language); |
505 context->set_accept_charset(profile_params_->accept_charset); | 504 context->set_accept_charset(profile_params_->accept_charset); |
506 context->set_referrer_charset(profile_params_->referrer_charset); | 505 context->set_referrer_charset(profile_params_->referrer_charset); |
507 context->set_transport_security_state( | 506 context->set_transport_security_state( |
508 profile_params_->transport_security_state); | 507 profile_params_->transport_security_state); |
509 context->set_ssl_config_service(profile_params_->ssl_config_service); | 508 context->set_ssl_config_service(profile_params_->ssl_config_service); |
510 context->set_appcache_service(profile_params_->appcache_service); | 509 context->set_appcache_service(profile_params_->appcache_service); |
511 context->set_blob_storage_context(profile_params_->blob_storage_context); | 510 context->set_blob_storage_context(profile_params_->blob_storage_context); |
512 context->set_file_system_context(profile_params_->file_system_context); | 511 context->set_file_system_context(profile_params_->file_system_context); |
513 context->set_extension_info_map(profile_params_->extension_info_map); | 512 context->set_extension_info_map(profile_params_->extension_info_map); |
514 } | 513 } |
515 | 514 |
516 void ProfileIOData::ShutdownOnUIThread() { | 515 void ProfileIOData::ShutdownOnUIThread() { |
517 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 516 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
518 enable_referrers_.Destroy(); | 517 enable_referrers_.Destroy(); |
519 } | 518 } |
OLD | NEW |