Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / extensions / browser / url_request_util.h
blobafa0edb5a8664686eead9af126a384e4d73464f2
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
3 // found in the LICENSE file.
5 #ifndef EXTENSIONS_BROWSER_URL_REQUEST_UTIL_H_
6 #define EXTENSIONS_BROWSER_URL_REQUEST_UTIL_H_
8 namespace net {
9 class URLRequest;
12 namespace extensions {
13 class Extension;
14 class InfoMap;
16 // Utilities related to URLRequest jobs for extension resources. See
17 // chrome/browser/extensions/extension_protocols_unittest.cc for related tests.
18 namespace url_request_util {
20 // Sets allowed=true to allow a chrome-extension:// resource request coming from
21 // renderer A to access a resource in an extension running in renderer B.
22 // Returns false when it couldn't determine if the resource is allowed or not
23 bool AllowCrossRendererResourceLoad(net::URLRequest* request,
24 bool is_incognito,
25 const Extension* extension,
26 InfoMap* extension_info_map,
27 bool* allowed);
29 // Returns true if |request| corresponds to a resource request from a
30 // <webview>.
31 bool IsWebViewRequest(const net::URLRequest* request);
33 } // namespace url_request_util
34 } // namespace extensions
36 #endif // EXTENSIONS_BROWSER_URL_REQUEST_UTIL_H_