Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2222723002: Avoid calling into the ContentBrowserClient interface from ResourceDispatcherHostImpl to determine … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Attempt to fix 64 bit windows redness Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 content::RenderProcessHost* process_host, 1124 content::RenderProcessHost* process_host,
1125 const GURL& url) { 1125 const GURL& url) {
1126 #if defined(ENABLE_EXTENSIONS) 1126 #if defined(ENABLE_EXTENSIONS)
1127 return ChromeContentBrowserClientExtensionsPart::CanCommitURL( 1127 return ChromeContentBrowserClientExtensionsPart::CanCommitURL(
1128 process_host, url); 1128 process_host, url);
1129 #else 1129 #else
1130 return true; 1130 return true;
1131 #endif 1131 #endif
1132 } 1132 }
1133 1133
1134 bool ChromeContentBrowserClient::IsIllegalOrigin(
1135 content::ResourceContext* resource_context,
1136 int child_process_id,
1137 const GURL& origin) {
1138 #if defined(ENABLE_EXTENSIONS)
1139 return ChromeContentBrowserClientExtensionsPart::IsIllegalOrigin(
1140 resource_context, child_process_id, origin);
1141 #else
1142 return false;
1143 #endif
1144 }
1145
1146 bool ChromeContentBrowserClient::ShouldAllowOpenURL( 1134 bool ChromeContentBrowserClient::ShouldAllowOpenURL(
1147 content::SiteInstance* site_instance, const GURL& url) { 1135 content::SiteInstance* site_instance, const GURL& url) {
1148 GURL from_url = site_instance->GetSiteURL(); 1136 GURL from_url = site_instance->GetSiteURL();
1149 1137
1150 #if defined(ENABLE_EXTENSIONS) 1138 #if defined(ENABLE_EXTENSIONS)
1151 bool result; 1139 bool result;
1152 if (ChromeContentBrowserClientExtensionsPart::ShouldAllowOpenURL( 1140 if (ChromeContentBrowserClientExtensionsPart::ShouldAllowOpenURL(
1153 site_instance, from_url, url, &result)) 1141 site_instance, from_url, url, &result))
1154 return result; 1142 return result;
1155 #endif 1143 #endif
(...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after
2267 blocked_params)); 2255 blocked_params));
2268 return false; 2256 return false;
2269 } 2257 }
2270 #endif 2258 #endif
2271 2259
2272 return true; 2260 return true;
2273 } 2261 }
2274 2262
2275 void ChromeContentBrowserClient::ResourceDispatcherHostCreated() { 2263 void ChromeContentBrowserClient::ResourceDispatcherHostCreated() {
2276 DCHECK_CURRENTLY_ON(BrowserThread::UI); 2264 DCHECK_CURRENTLY_ON(BrowserThread::UI);
2265 for (size_t i = 0; i < extra_parts_.size(); ++i)
2266 extra_parts_[i]->ResourceDispatcherHostCreated();
2267
2277 return g_browser_process->ResourceDispatcherHostCreated(); 2268 return g_browser_process->ResourceDispatcherHostCreated();
2278 } 2269 }
2279 2270
2280 content::SpeechRecognitionManagerDelegate* 2271 content::SpeechRecognitionManagerDelegate*
2281 ChromeContentBrowserClient::CreateSpeechRecognitionManagerDelegate() { 2272 ChromeContentBrowserClient::CreateSpeechRecognitionManagerDelegate() {
2282 return new speech::ChromeSpeechRecognitionManagerDelegate(); 2273 return new speech::ChromeSpeechRecognitionManagerDelegate();
2283 } 2274 }
2284 2275
2285 net::NetLog* ChromeContentBrowserClient::GetNetLog() { 2276 net::NetLog* ChromeContentBrowserClient::GetNetLog() {
2286 return g_browser_process->net_log(); 2277 return g_browser_process->net_log();
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
3048 if (channel <= kMaxDisableEncryptionChannel) { 3039 if (channel <= kMaxDisableEncryptionChannel) {
3049 static const char* const kWebRtcDevSwitchNames[] = { 3040 static const char* const kWebRtcDevSwitchNames[] = {
3050 switches::kDisableWebRtcEncryption, 3041 switches::kDisableWebRtcEncryption,
3051 }; 3042 };
3052 to_command_line->CopySwitchesFrom(from_command_line, 3043 to_command_line->CopySwitchesFrom(from_command_line,
3053 kWebRtcDevSwitchNames, 3044 kWebRtcDevSwitchNames,
3054 arraysize(kWebRtcDevSwitchNames)); 3045 arraysize(kWebRtcDevSwitchNames));
3055 } 3046 }
3056 } 3047 }
3057 #endif // defined(ENABLE_WEBRTC) 3048 #endif // defined(ENABLE_WEBRTC)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698