OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/extensions/url_request_util.h" | 5 #include "chrome/browser/extensions/url_request_util.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
127 | 127 |
128 } // namespace | 128 } // namespace |
129 | 129 |
130 namespace extensions { | 130 namespace extensions { |
131 namespace url_request_util { | 131 namespace url_request_util { |
132 | 132 |
133 bool AllowCrossRendererResourceLoad(net::URLRequest* request, | 133 bool AllowCrossRendererResourceLoad(net::URLRequest* request, |
134 bool is_incognito, | 134 bool is_incognito, |
135 const Extension* extension, | 135 const Extension* extension, |
136 InfoMap* extension_info_map) { | 136 InfoMap* extension_info_map) { |
137 return true; | |
jam
2014/06/06 15:00:40
ditto
| |
137 const content::ResourceRequestInfo* info = | 138 const content::ResourceRequestInfo* info = |
138 content::ResourceRequestInfo::ForRequest(request); | 139 content::ResourceRequestInfo::ForRequest(request); |
139 | 140 |
140 // Check workers so that importScripts works from extension workers. | 141 // Check workers so that importScripts works from extension workers. |
141 if (extension_info_map->worker_process_map().Contains(request->url().host(), | 142 if (extension_info_map->worker_process_map().Contains(request->url().host(), |
142 info->GetChildID())) { | 143 info->GetChildID())) { |
143 return true; | 144 return true; |
144 } | 145 } |
145 | 146 |
146 // Extensions with webview: allow loading certain resources by guest renderers | 147 // Extensions with webview: allow loading certain resources by guest renderers |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
247 return false; | 248 return false; |
248 ExtensionRendererState* renderer_state = | 249 ExtensionRendererState* renderer_state = |
249 ExtensionRendererState::GetInstance(); | 250 ExtensionRendererState::GetInstance(); |
250 ExtensionRendererState::WebViewInfo webview_info; | 251 ExtensionRendererState::WebViewInfo webview_info; |
251 return renderer_state->GetWebViewInfo( | 252 return renderer_state->GetWebViewInfo( |
252 info->GetChildID(), info->GetRouteID(), &webview_info); | 253 info->GetChildID(), info->GetRouteID(), &webview_info); |
253 } | 254 } |
254 | 255 |
255 } // namespace url_request_util | 256 } // namespace url_request_util |
256 } // namespace extensions | 257 } // namespace extensions |
OLD | NEW |