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.h" | 5 #include "chrome/browser/profiles/profile_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
901 } | 901 } |
902 | 902 |
903 net::URLRequestContextGetter* | 903 net::URLRequestContextGetter* |
904 ProfileImpl::GetMediaRequestContextForStoragePartition( | 904 ProfileImpl::GetMediaRequestContextForStoragePartition( |
905 const base::FilePath& partition_path, | 905 const base::FilePath& partition_path, |
906 bool in_memory) { | 906 bool in_memory) { |
907 return io_data_ | 907 return io_data_ |
908 .GetIsolatedMediaRequestContextGetter(partition_path, in_memory).get(); | 908 .GetIsolatedMediaRequestContextGetter(partition_path, in_memory).get(); |
909 } | 909 } |
910 | 910 |
911 void ProfileImpl::RequestMIDISysExPermission( | |
912 int render_process_id, | |
913 int render_view_id, | |
914 const GURL& requesting_frame, | |
915 const MIDISysExPermissionCallback& callback) { | |
916 ChromeMIDIPermissionContext* context = | |
917 ChromeMIDIPermissionContextFactory::GetForProfile(this); | |
918 context->RequestMIDISysExPermission(render_process_id, | |
919 render_view_id, | |
920 requesting_frame, | |
921 callback); | |
922 } | |
923 | |
924 content::ResourceContext* ProfileImpl::GetResourceContext() { | 911 content::ResourceContext* ProfileImpl::GetResourceContext() { |
925 return io_data_.GetResourceContext(); | 912 return io_data_.GetResourceContext(); |
926 } | 913 } |
927 | 914 |
928 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForExtensions() { | 915 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForExtensions() { |
929 return io_data_.GetExtensionsRequestContextGetter().get(); | 916 return io_data_.GetExtensionsRequestContextGetter().get(); |
930 } | 917 } |
931 | 918 |
932 net::URLRequestContextGetter* | 919 net::URLRequestContextGetter* |
933 ProfileImpl::CreateRequestContextForStoragePartition( | 920 ProfileImpl::CreateRequestContextForStoragePartition( |
(...skipping 20 matching lines...) Expand all Loading... |
954 host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), false); | 941 host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), false); |
955 } | 942 } |
956 return host_content_settings_map_.get(); | 943 return host_content_settings_map_.get(); |
957 } | 944 } |
958 | 945 |
959 content::GeolocationPermissionContext* | 946 content::GeolocationPermissionContext* |
960 ProfileImpl::GetGeolocationPermissionContext() { | 947 ProfileImpl::GetGeolocationPermissionContext() { |
961 return ChromeGeolocationPermissionContextFactory::GetForProfile(this); | 948 return ChromeGeolocationPermissionContextFactory::GetForProfile(this); |
962 } | 949 } |
963 | 950 |
| 951 content::MidiPermissionContext* |
| 952 ProfileImpl::GetMidiPermissionContext() { |
| 953 return ChromeMIDIPermissionContextFactory::GetForProfile(this); |
| 954 } |
| 955 |
964 DownloadManagerDelegate* ProfileImpl::GetDownloadManagerDelegate() { | 956 DownloadManagerDelegate* ProfileImpl::GetDownloadManagerDelegate() { |
965 return DownloadServiceFactory::GetForBrowserContext(this)-> | 957 return DownloadServiceFactory::GetForBrowserContext(this)-> |
966 GetDownloadManagerDelegate(); | 958 GetDownloadManagerDelegate(); |
967 } | 959 } |
968 | 960 |
969 quota::SpecialStoragePolicy* ProfileImpl::GetSpecialStoragePolicy() { | 961 quota::SpecialStoragePolicy* ProfileImpl::GetSpecialStoragePolicy() { |
970 return GetExtensionSpecialStoragePolicy(); | 962 return GetExtensionSpecialStoragePolicy(); |
971 } | 963 } |
972 | 964 |
973 bool ProfileImpl::IsSameProfile(Profile* profile) { | 965 bool ProfileImpl::IsSameProfile(Profile* profile) { |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1225 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() { | 1217 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() { |
1226 #if defined(OS_CHROMEOS) | 1218 #if defined(OS_CHROMEOS) |
1227 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 1219 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
1228 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 1220 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
1229 g_browser_process->local_state()); | 1221 g_browser_process->local_state()); |
1230 } | 1222 } |
1231 #endif // defined(OS_CHROMEOS) | 1223 #endif // defined(OS_CHROMEOS) |
1232 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 1224 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
1233 GetPrefs(), g_browser_process->local_state()); | 1225 GetPrefs(), g_browser_process->local_state()); |
1234 } | 1226 } |
OLD | NEW |