| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 #include "chrome/browser/content_settings/cookie_settings.h" | 35 #include "chrome/browser/content_settings/cookie_settings.h" |
| 36 #include "chrome/browser/content_settings/host_content_settings_map.h" | 36 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 37 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" | 37 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" |
| 38 #include "chrome/browser/dom_distiller/lazy_dom_distiller_service.h" | 38 #include "chrome/browser/dom_distiller/lazy_dom_distiller_service.h" |
| 39 #include "chrome/browser/download/chrome_download_manager_delegate.h" | 39 #include "chrome/browser/download/chrome_download_manager_delegate.h" |
| 40 #include "chrome/browser/download/download_service.h" | 40 #include "chrome/browser/download/download_service.h" |
| 41 #include "chrome/browser/download/download_service_factory.h" | 41 #include "chrome/browser/download/download_service_factory.h" |
| 42 #include "chrome/browser/extensions/extension_service.h" | 42 #include "chrome/browser/extensions/extension_service.h" |
| 43 #include "chrome/browser/extensions/extension_special_storage_policy.h" | 43 #include "chrome/browser/extensions/extension_special_storage_policy.h" |
| 44 #include "chrome/browser/history/top_sites.h" | 44 #include "chrome/browser/history/top_sites.h" |
| 45 #include "chrome/browser/media/chrome_midi_permission_context.h" | |
| 46 #include "chrome/browser/media/chrome_midi_permission_context_factory.h" | |
| 47 #include "chrome/browser/net/chrome_url_request_context.h" | 45 #include "chrome/browser/net/chrome_url_request_context.h" |
| 48 #include "chrome/browser/net/net_pref_observer.h" | 46 #include "chrome/browser/net/net_pref_observer.h" |
| 49 #include "chrome/browser/net/predictor.h" | 47 #include "chrome/browser/net/predictor.h" |
| 50 #include "chrome/browser/net/pref_proxy_config_tracker.h" | 48 #include "chrome/browser/net/pref_proxy_config_tracker.h" |
| 51 #include "chrome/browser/net/proxy_service_factory.h" | 49 #include "chrome/browser/net/proxy_service_factory.h" |
| 52 #include "chrome/browser/net/ssl_config_service_manager.h" | 50 #include "chrome/browser/net/ssl_config_service_manager.h" |
| 53 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" | 51 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" |
| 54 #include "chrome/browser/plugins/plugin_prefs.h" | 52 #include "chrome/browser/plugins/plugin_prefs.h" |
| 55 #include "chrome/browser/policy/profile_policy_connector.h" | 53 #include "chrome/browser/policy/profile_policy_connector.h" |
| 56 #include "chrome/browser/policy/profile_policy_connector_factory.h" | 54 #include "chrome/browser/policy/profile_policy_connector_factory.h" |
| (...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 961 } | 959 } |
| 962 | 960 |
| 963 net::URLRequestContextGetter* | 961 net::URLRequestContextGetter* |
| 964 ProfileImpl::GetMediaRequestContextForStoragePartition( | 962 ProfileImpl::GetMediaRequestContextForStoragePartition( |
| 965 const base::FilePath& partition_path, | 963 const base::FilePath& partition_path, |
| 966 bool in_memory) { | 964 bool in_memory) { |
| 967 return io_data_ | 965 return io_data_ |
| 968 .GetIsolatedMediaRequestContextGetter(partition_path, in_memory).get(); | 966 .GetIsolatedMediaRequestContextGetter(partition_path, in_memory).get(); |
| 969 } | 967 } |
| 970 | 968 |
| 971 void ProfileImpl::RequestMidiSysExPermission( | |
| 972 int render_process_id, | |
| 973 int render_view_id, | |
| 974 int bridge_id, | |
| 975 const GURL& requesting_frame, | |
| 976 bool user_gesture, | |
| 977 const MidiSysExPermissionCallback& callback) { | |
| 978 ChromeMidiPermissionContext* context = | |
| 979 ChromeMidiPermissionContextFactory::GetForProfile(this); | |
| 980 context->RequestMidiSysExPermission(render_process_id, | |
| 981 render_view_id, | |
| 982 bridge_id, | |
| 983 requesting_frame, | |
| 984 user_gesture, | |
| 985 callback); | |
| 986 } | |
| 987 | |
| 988 void ProfileImpl::CancelMidiSysExPermissionRequest( | |
| 989 int render_process_id, | |
| 990 int render_view_id, | |
| 991 int bridge_id, | |
| 992 const GURL& requesting_frame) { | |
| 993 ChromeMidiPermissionContext* context = | |
| 994 ChromeMidiPermissionContextFactory::GetForProfile(this); | |
| 995 context->CancelMidiSysExPermissionRequest( | |
| 996 render_process_id, render_view_id, bridge_id, requesting_frame); | |
| 997 } | |
| 998 | |
| 999 void ProfileImpl::RequestProtectedMediaIdentifierPermission( | 969 void ProfileImpl::RequestProtectedMediaIdentifierPermission( |
| 1000 int render_process_id, | 970 int render_process_id, |
| 1001 int render_view_id, | 971 int render_view_id, |
| 1002 const GURL& origin, | 972 const GURL& origin, |
| 1003 const ProtectedMediaIdentifierPermissionCallback& callback) { | 973 const ProtectedMediaIdentifierPermissionCallback& callback) { |
| 1004 #if defined(OS_ANDROID) | 974 #if defined(OS_ANDROID) |
| 1005 ProtectedMediaIdentifierPermissionContext* context = | 975 ProtectedMediaIdentifierPermissionContext* context = |
| 1006 ProtectedMediaIdentifierPermissionContextFactory::GetForProfile(this); | 976 ProtectedMediaIdentifierPermissionContextFactory::GetForProfile(this); |
| 1007 context->RequestProtectedMediaIdentifierPermission(render_process_id, | 977 context->RequestProtectedMediaIdentifierPermission(render_process_id, |
| 1008 render_view_id, | 978 render_view_id, |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1367 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() { | 1337 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() { |
| 1368 #if defined(OS_CHROMEOS) | 1338 #if defined(OS_CHROMEOS) |
| 1369 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 1339 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
| 1370 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 1340 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
| 1371 g_browser_process->local_state()); | 1341 g_browser_process->local_state()); |
| 1372 } | 1342 } |
| 1373 #endif // defined(OS_CHROMEOS) | 1343 #endif // defined(OS_CHROMEOS) |
| 1374 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 1344 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
| 1375 GetPrefs(), g_browser_process->local_state()); | 1345 GetPrefs(), g_browser_process->local_state()); |
| 1376 } | 1346 } |
| OLD | NEW |