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 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
860 bool in_memory) { | 862 bool in_memory) { |
861 return io_data_ | 863 return io_data_ |
862 .GetIsolatedMediaRequestContextGetter(partition_path, in_memory).get(); | 864 .GetIsolatedMediaRequestContextGetter(partition_path, in_memory).get(); |
863 } | 865 } |
864 | 866 |
865 void ProfileImpl::RequestMIDISysExPermission( | 867 void ProfileImpl::RequestMIDISysExPermission( |
866 int render_process_id, | 868 int render_process_id, |
867 int render_view_id, | 869 int render_view_id, |
868 const GURL& requesting_frame, | 870 const GURL& requesting_frame, |
869 const MIDISysExPermissionCallback& callback) { | 871 const MIDISysExPermissionCallback& callback) { |
870 // TODO(toyoshim): Implement. http://crbug.com/257618 . | 872 ChromeMIDIPermissionContext* context = |
871 callback.Run(false); | 873 ChromeMIDIPermissionContextFactory::GetForProfile(this); |
| 874 context->RequestMIDISysExPermission(render_process_id, |
| 875 render_view_id, |
| 876 requesting_frame, |
| 877 callback); |
872 } | 878 } |
873 | 879 |
874 content::ResourceContext* ProfileImpl::GetResourceContext() { | 880 content::ResourceContext* ProfileImpl::GetResourceContext() { |
875 return io_data_.GetResourceContext(); | 881 return io_data_.GetResourceContext(); |
876 } | 882 } |
877 | 883 |
878 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForExtensions() { | 884 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForExtensions() { |
879 return io_data_.GetExtensionsRequestContextGetter().get(); | 885 return io_data_.GetExtensionsRequestContextGetter().get(); |
880 } | 886 } |
881 | 887 |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1164 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() { | 1170 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() { |
1165 #if defined(OS_CHROMEOS) | 1171 #if defined(OS_CHROMEOS) |
1166 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 1172 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
1167 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 1173 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
1168 g_browser_process->local_state()); | 1174 g_browser_process->local_state()); |
1169 } | 1175 } |
1170 #endif // defined(OS_CHROMEOS) | 1176 #endif // defined(OS_CHROMEOS) |
1171 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 1177 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
1172 GetPrefs(), g_browser_process->local_state()); | 1178 GetPrefs(), g_browser_process->local_state()); |
1173 } | 1179 } |
OLD | NEW |