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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 prerender_manager_ = profile_params_->prerender_manager; | 469 prerender_manager_ = profile_params_->prerender_manager; |
470 | 470 |
471 resource_context_.set_host_resolver(io_thread_globals->host_resolver.get()); | 471 resource_context_.set_host_resolver(io_thread_globals->host_resolver.get()); |
472 resource_context_.set_request_context(main_request_context_); | 472 resource_context_.set_request_context(main_request_context_); |
473 resource_context_.set_database_tracker(database_tracker_); | 473 resource_context_.set_database_tracker(database_tracker_); |
474 resource_context_.set_appcache_service(appcache_service_); | 474 resource_context_.set_appcache_service(appcache_service_); |
475 resource_context_.set_blob_storage_context(blob_storage_context_); | 475 resource_context_.set_blob_storage_context(blob_storage_context_); |
476 resource_context_.set_file_system_context(file_system_context_); | 476 resource_context_.set_file_system_context(file_system_context_); |
477 resource_context_.set_quota_manager(quota_manager_); | 477 resource_context_.set_quota_manager(quota_manager_); |
478 resource_context_.set_host_zoom_map(host_zoom_map_); | 478 resource_context_.set_host_zoom_map(host_zoom_map_); |
479 resource_context_.set_extension_info_map(extension_info_map_); | |
480 resource_context_.set_prerender_manager(prerender_manager_); | 479 resource_context_.set_prerender_manager(prerender_manager_); |
481 resource_context_.SetUserData(NULL, const_cast<ProfileIOData*>(this)); | 480 resource_context_.SetUserData(NULL, const_cast<ProfileIOData*>(this)); |
482 | 481 |
483 LazyInitializeInternal(profile_params_.get()); | 482 LazyInitializeInternal(profile_params_.get()); |
484 | 483 |
485 profile_params_.reset(); | 484 profile_params_.reset(); |
486 initialized_ = true; | 485 initialized_ = true; |
487 } | 486 } |
488 | 487 |
489 void ProfileIOData::ApplyProfileParamsToContext( | 488 void ProfileIOData::ApplyProfileParamsToContext( |
490 ChromeURLRequestContext* context) const { | 489 ChromeURLRequestContext* context) const { |
491 context->set_is_incognito(profile_params_->is_incognito); | 490 context->set_is_incognito(profile_params_->is_incognito); |
492 context->set_accept_language(profile_params_->accept_language); | 491 context->set_accept_language(profile_params_->accept_language); |
493 context->set_accept_charset(profile_params_->accept_charset); | 492 context->set_accept_charset(profile_params_->accept_charset); |
494 context->set_referrer_charset(profile_params_->referrer_charset); | 493 context->set_referrer_charset(profile_params_->referrer_charset); |
495 context->set_transport_security_state( | 494 context->set_transport_security_state( |
496 profile_params_->transport_security_state); | 495 profile_params_->transport_security_state); |
497 context->set_ssl_config_service(profile_params_->ssl_config_service); | 496 context->set_ssl_config_service(profile_params_->ssl_config_service); |
498 context->set_appcache_service(profile_params_->appcache_service); | 497 context->set_appcache_service(profile_params_->appcache_service); |
499 context->set_blob_storage_context(profile_params_->blob_storage_context); | 498 context->set_blob_storage_context(profile_params_->blob_storage_context); |
500 context->set_file_system_context(profile_params_->file_system_context); | 499 context->set_file_system_context(profile_params_->file_system_context); |
501 context->set_extension_info_map(profile_params_->extension_info_map); | 500 context->set_extension_info_map(profile_params_->extension_info_map); |
502 } | 501 } |
503 | 502 |
504 void ProfileIOData::ShutdownOnUIThread() { | 503 void ProfileIOData::ShutdownOnUIThread() { |
505 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 504 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
506 enable_referrers_.Destroy(); | 505 enable_referrers_.Destroy(); |
507 } | 506 } |
OLD | NEW |