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::GetClientCertStore() { | |
717 #if !defined(USE_OPENSSL) | |
wtc
2013/10/28 19:41:12
Could you add a comment to explain this? This seem
mattm
2013/10/28 23:56:16
Done.
| |
718 return scoped_ptr<net::ClientCertStore>(new net::ClientCertStoreImpl()); | |
wtc
2013/10/28 19:41:12
This looks more like a "CreateClientCertStore" met
mattm
2013/10/28 23:56:16
Changed to CreateClientCertStore. If we implement
| |
719 #else | |
720 return scoped_ptr<net::ClientCertStore>(); | |
721 #endif | |
722 } | |
723 | |
713 bool ProfileIOData::ResourceContext::AllowMicAccess(const GURL& origin) { | 724 bool ProfileIOData::ResourceContext::AllowMicAccess(const GURL& origin) { |
714 return AllowContentAccess(origin, CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC); | 725 return AllowContentAccess(origin, CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC); |
715 } | 726 } |
716 | 727 |
717 bool ProfileIOData::ResourceContext::AllowCameraAccess(const GURL& origin) { | 728 bool ProfileIOData::ResourceContext::AllowCameraAccess(const GURL& origin) { |
718 return AllowContentAccess(origin, CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA); | 729 return AllowContentAccess(origin, CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA); |
719 } | 730 } |
720 | 731 |
721 bool ProfileIOData::ResourceContext::AllowContentAccess( | 732 bool ProfileIOData::ResourceContext::AllowContentAccess( |
722 const GURL& origin, ContentSettingsType type) { | 733 const GURL& origin, ContentSettingsType type) { |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
978 void ProfileIOData::SetCookieSettingsForTesting( | 989 void ProfileIOData::SetCookieSettingsForTesting( |
979 CookieSettings* cookie_settings) { | 990 CookieSettings* cookie_settings) { |
980 DCHECK(!cookie_settings_.get()); | 991 DCHECK(!cookie_settings_.get()); |
981 cookie_settings_ = cookie_settings; | 992 cookie_settings_ = cookie_settings; |
982 } | 993 } |
983 | 994 |
984 void ProfileIOData::set_signin_names_for_testing( | 995 void ProfileIOData::set_signin_names_for_testing( |
985 SigninNamesOnIOThread* signin_names) { | 996 SigninNamesOnIOThread* signin_names) { |
986 signin_names_.reset(signin_names); | 997 signin_names_.reset(signin_names); |
987 } | 998 } |
OLD | NEW |