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_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/bind.h" | 10 #include "base/bind.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 #include "content/public/browser/resource_context.h" | 64 #include "content/public/browser/resource_context.h" |
65 #include "extensions/common/constants.h" | 65 #include "extensions/common/constants.h" |
66 #include "net/cert/cert_verifier.h" | 66 #include "net/cert/cert_verifier.h" |
67 #include "net/cookies/canonical_cookie.h" | 67 #include "net/cookies/canonical_cookie.h" |
68 #include "net/cookies/cookie_monster.h" | 68 #include "net/cookies/cookie_monster.h" |
69 #include "net/http/http_transaction_factory.h" | 69 #include "net/http/http_transaction_factory.h" |
70 #include "net/http/http_util.h" | 70 #include "net/http/http_util.h" |
71 #include "net/proxy/proxy_config_service_fixed.h" | 71 #include "net/proxy/proxy_config_service_fixed.h" |
72 #include "net/proxy/proxy_script_fetcher_impl.h" | 72 #include "net/proxy/proxy_script_fetcher_impl.h" |
73 #include "net/proxy/proxy_service.h" | 73 #include "net/proxy/proxy_service.h" |
| 74 #include "net/ssl/client_cert_store.h" |
| 75 #include "net/ssl/client_cert_store_impl.h" |
74 #include "net/ssl/server_bound_cert_service.h" | 76 #include "net/ssl/server_bound_cert_service.h" |
75 #include "net/url_request/data_protocol_handler.h" | 77 #include "net/url_request/data_protocol_handler.h" |
76 #include "net/url_request/file_protocol_handler.h" | 78 #include "net/url_request/file_protocol_handler.h" |
77 #include "net/url_request/ftp_protocol_handler.h" | 79 #include "net/url_request/ftp_protocol_handler.h" |
78 #include "net/url_request/protocol_intercept_job_factory.h" | 80 #include "net/url_request/protocol_intercept_job_factory.h" |
79 #include "net/url_request/url_request.h" | 81 #include "net/url_request/url_request.h" |
80 #include "net/url_request/url_request_file_job.h" | 82 #include "net/url_request/url_request_file_job.h" |
81 #include "net/url_request/url_request_job_factory_impl.h" | 83 #include "net/url_request/url_request_job_factory_impl.h" |
82 | 84 |
83 #if defined(ENABLE_MANAGED_USERS) | 85 #if defined(ENABLE_MANAGED_USERS) |
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 DCHECK(io_data_->initialized_); | 705 DCHECK(io_data_->initialized_); |
704 return host_resolver_; | 706 return host_resolver_; |
705 } | 707 } |
706 | 708 |
707 net::URLRequestContext* ProfileIOData::ResourceContext::GetRequestContext() { | 709 net::URLRequestContext* ProfileIOData::ResourceContext::GetRequestContext() { |
708 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 710 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
709 DCHECK(io_data_->initialized_); | 711 DCHECK(io_data_->initialized_); |
710 return request_context_; | 712 return request_context_; |
711 } | 713 } |
712 | 714 |
| 715 scoped_ptr<net::ClientCertStore> |
| 716 ProfileIOData::ResourceContext::CreateClientCertStore() { |
| 717 #if !defined(USE_OPENSSL) |
| 718 return scoped_ptr<net::ClientCertStore>(new net::ClientCertStoreImpl()); |
| 719 #else |
| 720 // OpenSSL does not use the ClientCertStore infrastructure. On Android client |
| 721 // cert matching is done by the OS as part of the call to show the cert |
| 722 // selection dialog. |
| 723 return scoped_ptr<net::ClientCertStore>(); |
| 724 #endif |
| 725 } |
| 726 |
713 bool ProfileIOData::ResourceContext::AllowMicAccess(const GURL& origin) { | 727 bool ProfileIOData::ResourceContext::AllowMicAccess(const GURL& origin) { |
714 return AllowContentAccess(origin, CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC); | 728 return AllowContentAccess(origin, CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC); |
715 } | 729 } |
716 | 730 |
717 bool ProfileIOData::ResourceContext::AllowCameraAccess(const GURL& origin) { | 731 bool ProfileIOData::ResourceContext::AllowCameraAccess(const GURL& origin) { |
718 return AllowContentAccess(origin, CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA); | 732 return AllowContentAccess(origin, CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA); |
719 } | 733 } |
720 | 734 |
721 bool ProfileIOData::ResourceContext::AllowContentAccess( | 735 bool ProfileIOData::ResourceContext::AllowContentAccess( |
722 const GURL& origin, ContentSettingsType type) { | 736 const GURL& origin, ContentSettingsType type) { |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
978 void ProfileIOData::SetCookieSettingsForTesting( | 992 void ProfileIOData::SetCookieSettingsForTesting( |
979 CookieSettings* cookie_settings) { | 993 CookieSettings* cookie_settings) { |
980 DCHECK(!cookie_settings_.get()); | 994 DCHECK(!cookie_settings_.get()); |
981 cookie_settings_ = cookie_settings; | 995 cookie_settings_ = cookie_settings; |
982 } | 996 } |
983 | 997 |
984 void ProfileIOData::set_signin_names_for_testing( | 998 void ProfileIOData::set_signin_names_for_testing( |
985 SigninNamesOnIOThread* signin_names) { | 999 SigninNamesOnIOThread* signin_names) { |
986 signin_names_.reset(signin_names); | 1000 signin_names_.reset(signin_names); |
987 } | 1001 } |
OLD | NEW |