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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 network_delegate, | 232 network_delegate, |
233 relative_path, | 233 relative_path, |
234 resource_id, | 234 resource_id, |
235 content_security_policy, | 235 content_security_policy, |
236 send_cors_header); | 236 send_cors_header); |
237 } | 237 } |
238 } | 238 } |
239 return NULL; | 239 return NULL; |
240 } | 240 } |
241 | 241 |
| 242 bool IsWebViewRequest(net::URLRequest* request) { |
| 243 const content::ResourceRequestInfo* info = |
| 244 content::ResourceRequestInfo::ForRequest(request); |
| 245 ExtensionRendererState* renderer_state = |
| 246 ExtensionRendererState::GetInstance(); |
| 247 ExtensionRendererState::WebViewInfo webview_info; |
| 248 return renderer_state->GetWebViewInfo( |
| 249 info->GetChildID(), info->GetRouteID(), &webview_info); |
| 250 } |
| 251 |
242 } // namespace url_request_util | 252 } // namespace url_request_util |
243 } // namespace extensions | 253 } // namespace extensions |
OLD | NEW |