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

Side by Side Diff: chrome/browser/extensions/url_request_util.cc

Issue 237793003: Use default CSP for resource loading in webview (instead of platform app's CSP) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment to added file Created 6 years, 8 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 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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698