| 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 <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1065 } | 1065 } |
| 1066 | 1066 |
| 1067 // These are treated as WebUI schemes but do not get WebUI bindings. Also, | 1067 // These are treated as WebUI schemes but do not get WebUI bindings. Also, |
| 1068 // view-source is allowed for these schemes. | 1068 // view-source is allowed for these schemes. |
| 1069 void ChromeContentBrowserClient::GetAdditionalWebUISchemes( | 1069 void ChromeContentBrowserClient::GetAdditionalWebUISchemes( |
| 1070 std::vector<std::string>* additional_schemes) { | 1070 std::vector<std::string>* additional_schemes) { |
| 1071 additional_schemes->push_back(chrome::kChromeSearchScheme); | 1071 additional_schemes->push_back(chrome::kChromeSearchScheme); |
| 1072 additional_schemes->push_back(chrome::kDomDistillerScheme); | 1072 additional_schemes->push_back(chrome::kDomDistillerScheme); |
| 1073 } | 1073 } |
| 1074 | 1074 |
| 1075 net::URLRequestContextGetter* | 1075 net::URLRequestContextGetter* ChromeContentBrowserClient::CreateRequestContext( |
| 1076 ChromeContentBrowserClient::CreateRequestContext( | |
| 1077 content::BrowserContext* browser_context, | 1076 content::BrowserContext* browser_context, |
| 1078 content::ProtocolHandlerMap* protocol_handlers) { | 1077 content::ProtocolHandlerMap* protocol_handlers, |
| 1078 content::ProtocolHandlerScopedVector protocol_interceptors) { |
| 1079 Profile* profile = Profile::FromBrowserContext(browser_context); | 1079 Profile* profile = Profile::FromBrowserContext(browser_context); |
| 1080 return profile->CreateRequestContext(protocol_handlers); | 1080 return profile->CreateRequestContext(protocol_handlers, |
| 1081 protocol_interceptors.Pass()); |
| 1081 } | 1082 } |
| 1082 | 1083 |
| 1083 net::URLRequestContextGetter* | 1084 net::URLRequestContextGetter* |
| 1084 ChromeContentBrowserClient::CreateRequestContextForStoragePartition( | 1085 ChromeContentBrowserClient::CreateRequestContextForStoragePartition( |
| 1085 content::BrowserContext* browser_context, | 1086 content::BrowserContext* browser_context, |
| 1086 const base::FilePath& partition_path, | 1087 const base::FilePath& partition_path, |
| 1087 bool in_memory, | 1088 bool in_memory, |
| 1088 content::ProtocolHandlerMap* protocol_handlers) { | 1089 content::ProtocolHandlerMap* protocol_handlers, |
| 1090 content::ProtocolHandlerScopedVector protocol_interceptors) { |
| 1089 Profile* profile = Profile::FromBrowserContext(browser_context); | 1091 Profile* profile = Profile::FromBrowserContext(browser_context); |
| 1090 return profile->CreateRequestContextForStoragePartition( | 1092 return profile->CreateRequestContextForStoragePartition( |
| 1091 partition_path, in_memory, protocol_handlers); | 1093 partition_path, |
| 1094 in_memory, |
| 1095 protocol_handlers, |
| 1096 protocol_interceptors.Pass()); |
| 1092 } | 1097 } |
| 1093 | 1098 |
| 1094 bool ChromeContentBrowserClient::IsHandledURL(const GURL& url) { | 1099 bool ChromeContentBrowserClient::IsHandledURL(const GURL& url) { |
| 1095 return ProfileIOData::IsHandledURL(url); | 1100 return ProfileIOData::IsHandledURL(url); |
| 1096 } | 1101 } |
| 1097 | 1102 |
| 1098 bool ChromeContentBrowserClient::CanCommitURL( | 1103 bool ChromeContentBrowserClient::CanCommitURL( |
| 1099 content::RenderProcessHost* process_host, | 1104 content::RenderProcessHost* process_host, |
| 1100 const GURL& url) { | 1105 const GURL& url) { |
| 1101 // We need to let most extension URLs commit in any process, since this can | 1106 // We need to let most extension URLs commit in any process, since this can |
| (...skipping 1626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2728 switches::kDisableWebRtcEncryption, | 2733 switches::kDisableWebRtcEncryption, |
| 2729 }; | 2734 }; |
| 2730 to_command_line->CopySwitchesFrom(from_command_line, | 2735 to_command_line->CopySwitchesFrom(from_command_line, |
| 2731 kWebRtcDevSwitchNames, | 2736 kWebRtcDevSwitchNames, |
| 2732 arraysize(kWebRtcDevSwitchNames)); | 2737 arraysize(kWebRtcDevSwitchNames)); |
| 2733 } | 2738 } |
| 2734 } | 2739 } |
| 2735 #endif // defined(ENABLE_WEBRTC) | 2740 #endif // defined(ENABLE_WEBRTC) |
| 2736 | 2741 |
| 2737 } // namespace chrome | 2742 } // namespace chrome |
| OLD | NEW |