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 26 matching lines...) Expand all Loading... |
37 #include "chrome/browser/extensions/extension_pref_store.h" | 37 #include "chrome/browser/extensions/extension_pref_store.h" |
38 #include "chrome/browser/extensions/extension_pref_value_map.h" | 38 #include "chrome/browser/extensions/extension_pref_value_map.h" |
39 #include "chrome/browser/extensions/extension_pref_value_map_factory.h" | 39 #include "chrome/browser/extensions/extension_pref_value_map_factory.h" |
40 #include "chrome/browser/extensions/extension_service.h" | 40 #include "chrome/browser/extensions/extension_service.h" |
41 #include "chrome/browser/extensions/extension_special_storage_policy.h" | 41 #include "chrome/browser/extensions/extension_special_storage_policy.h" |
42 #include "chrome/browser/extensions/extension_system.h" | 42 #include "chrome/browser/extensions/extension_system.h" |
43 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h" | 43 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h" |
44 #include "chrome/browser/geolocation/chrome_geolocation_permission_context_facto
ry.h" | 44 #include "chrome/browser/geolocation/chrome_geolocation_permission_context_facto
ry.h" |
45 #include "chrome/browser/history/shortcuts_backend.h" | 45 #include "chrome/browser/history/shortcuts_backend.h" |
46 #include "chrome/browser/history/top_sites.h" | 46 #include "chrome/browser/history/top_sites.h" |
| 47 #include "chrome/browser/media/chrome_midi_permission_context.h" |
| 48 #include "chrome/browser/media/chrome_midi_permission_context_factory.h" |
47 #include "chrome/browser/metrics/metrics_service.h" | 49 #include "chrome/browser/metrics/metrics_service.h" |
48 #include "chrome/browser/net/chrome_url_request_context.h" | 50 #include "chrome/browser/net/chrome_url_request_context.h" |
49 #include "chrome/browser/net/net_pref_observer.h" | 51 #include "chrome/browser/net/net_pref_observer.h" |
50 #include "chrome/browser/net/predictor.h" | 52 #include "chrome/browser/net/predictor.h" |
51 #include "chrome/browser/net/pref_proxy_config_tracker.h" | 53 #include "chrome/browser/net/pref_proxy_config_tracker.h" |
52 #include "chrome/browser/net/proxy_service_factory.h" | 54 #include "chrome/browser/net/proxy_service_factory.h" |
53 #include "chrome/browser/net/ssl_config_service_manager.h" | 55 #include "chrome/browser/net/ssl_config_service_manager.h" |
54 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" | 56 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" |
55 #include "chrome/browser/plugins/plugin_prefs.h" | 57 #include "chrome/browser/plugins/plugin_prefs.h" |
56 #include "chrome/browser/policy/profile_policy_connector.h" | 58 #include "chrome/browser/policy/profile_policy_connector.h" |
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
856 bool in_memory) { | 858 bool in_memory) { |
857 return io_data_ | 859 return io_data_ |
858 .GetIsolatedMediaRequestContextGetter(partition_path, in_memory).get(); | 860 .GetIsolatedMediaRequestContextGetter(partition_path, in_memory).get(); |
859 } | 861 } |
860 | 862 |
861 void ProfileImpl::RequestMIDISysExPermission( | 863 void ProfileImpl::RequestMIDISysExPermission( |
862 int render_process_id, | 864 int render_process_id, |
863 int render_view_id, | 865 int render_view_id, |
864 const GURL& requesting_frame, | 866 const GURL& requesting_frame, |
865 const MIDISysExPermissionCallback& callback) { | 867 const MIDISysExPermissionCallback& callback) { |
866 // TODO(toyoshim): Implement. http://crbug.com/257618 . | 868 ChromeMIDIPermissionContext* context = |
867 callback.Run(false); | 869 ChromeMIDIPermissionContextFactory::GetForProfile(this); |
| 870 context->RequestMIDISysExPermission(render_process_id, |
| 871 render_view_id, |
| 872 requesting_frame, |
| 873 callback); |
868 } | 874 } |
869 | 875 |
870 content::ResourceContext* ProfileImpl::GetResourceContext() { | 876 content::ResourceContext* ProfileImpl::GetResourceContext() { |
871 return io_data_.GetResourceContext(); | 877 return io_data_.GetResourceContext(); |
872 } | 878 } |
873 | 879 |
874 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForExtensions() { | 880 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForExtensions() { |
875 return io_data_.GetExtensionsRequestContextGetter().get(); | 881 return io_data_.GetExtensionsRequestContextGetter().get(); |
876 } | 882 } |
877 | 883 |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1160 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() { | 1166 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() { |
1161 #if defined(OS_CHROMEOS) | 1167 #if defined(OS_CHROMEOS) |
1162 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 1168 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
1163 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 1169 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
1164 g_browser_process->local_state()); | 1170 g_browser_process->local_state()); |
1165 } | 1171 } |
1166 #endif // defined(OS_CHROMEOS) | 1172 #endif // defined(OS_CHROMEOS) |
1167 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 1173 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
1168 GetPrefs(), g_browser_process->local_state()); | 1174 GetPrefs(), g_browser_process->local_state()); |
1169 } | 1175 } |
OLD | NEW |