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/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1080 hosts->push_back(chrome::kChromeUIThemeHost); | 1080 hosts->push_back(chrome::kChromeUIThemeHost); |
1081 hosts->push_back(chrome::kChromeUIThumbnailHost); | 1081 hosts->push_back(chrome::kChromeUIThumbnailHost); |
1082 hosts->push_back(chrome::kChromeUIThumbnailHost2); | 1082 hosts->push_back(chrome::kChromeUIThumbnailHost2); |
1083 hosts->push_back(chrome::kChromeUIThumbnailListHost); | 1083 hosts->push_back(chrome::kChromeUIThumbnailListHost); |
1084 } | 1084 } |
1085 | 1085 |
1086 bool ChromeContentBrowserClient::LogWebUIUrl(const GURL& web_ui_url) const { | 1086 bool ChromeContentBrowserClient::LogWebUIUrl(const GURL& web_ui_url) const { |
1087 return webui::LogWebUIUrl(web_ui_url); | 1087 return webui::LogWebUIUrl(web_ui_url); |
1088 } | 1088 } |
1089 | 1089 |
1090 net::URLRequestContextGetter* | |
1091 ChromeContentBrowserClient::CreateRequestContext( | |
1092 content::BrowserContext* browser_context, | |
1093 content::ProtocolHandlerMap* protocol_handlers, | |
1094 content::URLRequestInterceptorScopedVector request_interceptors) { | |
1095 Profile* profile = Profile::FromBrowserContext(browser_context); | |
1096 return profile->CreateRequestContext(protocol_handlers, | |
1097 std::move(request_interceptors)); | |
1098 } | |
1099 | |
1100 net::URLRequestContextGetter* | |
1101 ChromeContentBrowserClient::CreateRequestContextForStoragePartition( | |
1102 content::BrowserContext* browser_context, | |
1103 const base::FilePath& partition_path, | |
1104 bool in_memory, | |
1105 content::ProtocolHandlerMap* protocol_handlers, | |
1106 content::URLRequestInterceptorScopedVector request_interceptors) { | |
1107 Profile* profile = Profile::FromBrowserContext(browser_context); | |
1108 return profile->CreateRequestContextForStoragePartition( | |
1109 partition_path, in_memory, protocol_handlers, | |
1110 std::move(request_interceptors)); | |
1111 } | |
1112 | |
1113 bool ChromeContentBrowserClient::IsHandledURL(const GURL& url) { | 1090 bool ChromeContentBrowserClient::IsHandledURL(const GURL& url) { |
1114 return ProfileIOData::IsHandledURL(url); | 1091 return ProfileIOData::IsHandledURL(url); |
1115 } | 1092 } |
1116 | 1093 |
1117 bool ChromeContentBrowserClient::CanCommitURL( | 1094 bool ChromeContentBrowserClient::CanCommitURL( |
1118 content::RenderProcessHost* process_host, | 1095 content::RenderProcessHost* process_host, |
1119 const GURL& url) { | 1096 const GURL& url) { |
1120 #if defined(ENABLE_EXTENSIONS) | 1097 #if defined(ENABLE_EXTENSIONS) |
1121 return ChromeContentBrowserClientExtensionsPart::CanCommitURL( | 1098 return ChromeContentBrowserClientExtensionsPart::CanCommitURL( |
1122 process_host, url); | 1099 process_host, url); |
(...skipping 1850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2973 if (channel <= kMaxDisableEncryptionChannel) { | 2950 if (channel <= kMaxDisableEncryptionChannel) { |
2974 static const char* const kWebRtcDevSwitchNames[] = { | 2951 static const char* const kWebRtcDevSwitchNames[] = { |
2975 switches::kDisableWebRtcEncryption, | 2952 switches::kDisableWebRtcEncryption, |
2976 }; | 2953 }; |
2977 to_command_line->CopySwitchesFrom(from_command_line, | 2954 to_command_line->CopySwitchesFrom(from_command_line, |
2978 kWebRtcDevSwitchNames, | 2955 kWebRtcDevSwitchNames, |
2979 arraysize(kWebRtcDevSwitchNames)); | 2956 arraysize(kWebRtcDevSwitchNames)); |
2980 } | 2957 } |
2981 } | 2958 } |
2982 #endif // defined(ENABLE_WEBRTC) | 2959 #endif // defined(ENABLE_WEBRTC) |
OLD | NEW |