Chromium Code Reviews| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 130 | 130 |
| 131 } // namespace | 131 } // namespace |
| 132 | 132 |
| 133 namespace extensions { | 133 namespace extensions { |
| 134 namespace url_request_util { | 134 namespace url_request_util { |
| 135 | 135 |
| 136 bool AllowCrossRendererResourceLoad(net::URLRequest* request, | 136 bool AllowCrossRendererResourceLoad(net::URLRequest* request, |
| 137 bool is_incognito, | 137 bool is_incognito, |
| 138 const Extension* extension, | 138 const Extension* extension, |
| 139 InfoMap* extension_info_map) { | 139 InfoMap* extension_info_map) { |
| 140 return true; | |
|
Fady Samuel
2014/07/09 14:54:17
We should have a MimeTypeHandlerRendererState obje
lazyboy
2014/07/10 04:11:00
This part I've inherited from Zach's old patch.
So
Fady Samuel
2014/07/10 15:13:42
To some degree, I think. We shouldn't allow it to
| |
| 140 const content::ResourceRequestInfo* info = | 141 const content::ResourceRequestInfo* info = |
| 141 content::ResourceRequestInfo::ForRequest(request); | 142 content::ResourceRequestInfo::ForRequest(request); |
| 142 | 143 |
| 143 // Check workers so that importScripts works from extension workers. | 144 // Check workers so that importScripts works from extension workers. |
| 144 if (extension_info_map->worker_process_map().Contains(request->url().host(), | 145 if (extension_info_map->worker_process_map().Contains(request->url().host(), |
| 145 info->GetChildID())) { | 146 info->GetChildID())) { |
| 146 return true; | 147 return true; |
| 147 } | 148 } |
| 148 | 149 |
| 149 bool is_guest = false; | 150 bool is_guest = false; |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 255 return false; | 256 return false; |
| 256 #if defined(ENABLE_EXTENSIONS) | 257 #if defined(ENABLE_EXTENSIONS) |
| 257 return WebViewRendererState::GetInstance()->IsGuest(info->GetChildID()); | 258 return WebViewRendererState::GetInstance()->IsGuest(info->GetChildID()); |
| 258 #else | 259 #else |
| 259 return false; | 260 return false; |
| 260 #endif | 261 #endif |
| 261 } | 262 } |
| 262 | 263 |
| 263 } // namespace url_request_util | 264 } // namespace url_request_util |
| 264 } // namespace extensions | 265 } // namespace extensions |
| OLD | NEW |