OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 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. |
| 4 |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_PERMISSIONS_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_PERMISSIONS_H_ |
| 7 |
| 8 #include <map> |
| 9 #include <string> |
| 10 |
| 11 #include "base/basictypes.h" |
| 12 |
| 13 class ExtensionInfoMap; |
| 14 class GURL; |
| 15 |
| 16 namespace net { |
| 17 class URLRequest; |
| 18 } |
| 19 |
| 20 // This class is used to test whether extensions may modify web requests. |
| 21 class WebRequestPermissions { |
| 22 public: |
| 23 // Returns true if the request shall not be reported to extensions. |
| 24 static bool HideRequest(const net::URLRequest* request); |
| 25 |
| 26 static bool CanExtensionAccessURL(const ExtensionInfoMap* extension_info_map, |
| 27 const std::string& extension_id, |
| 28 const GURL& url, |
| 29 bool crosses_incognito, |
| 30 bool enforce_host_permissions); |
| 31 |
| 32 private: |
| 33 DISALLOW_IMPLICIT_CONSTRUCTORS(WebRequestPermissions); |
| 34 }; |
| 35 |
| 36 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_PERMISSIONS_H_ |
OLD | NEW |