| Index: chrome/browser/extensions/api/web_request/web_request_permissions.h
|
| diff --git a/chrome/browser/extensions/api/web_request/web_request_permissions.h b/chrome/browser/extensions/api/web_request/web_request_permissions.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d7923b988575501fce3d326afb67f72b78476f8a
|
| --- /dev/null
|
| +++ b/chrome/browser/extensions/api/web_request/web_request_permissions.h
|
| @@ -0,0 +1,36 @@
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_PERMISSIONS_H_
|
| +#define CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_PERMISSIONS_H_
|
| +
|
| +#include <map>
|
| +#include <string>
|
| +
|
| +#include "base/basictypes.h"
|
| +
|
| +class ExtensionInfoMap;
|
| +class GURL;
|
| +
|
| +namespace net {
|
| +class URLRequest;
|
| +}
|
| +
|
| +// This class is used to test whether extensions may modify web requests.
|
| +class WebRequestPermissions {
|
| + public:
|
| + // Returns true if the request shall not be reported to extensions.
|
| + static bool HideRequest(const net::URLRequest* request);
|
| +
|
| + static bool CanExtensionAccessURL(const ExtensionInfoMap* extension_info_map,
|
| + const std::string& extension_id,
|
| + const GURL& url,
|
| + bool crosses_incognito,
|
| + bool enforce_host_permissions);
|
| +
|
| + private:
|
| + DISALLOW_IMPLICIT_CONSTRUCTORS(WebRequestPermissions);
|
| +};
|
| +
|
| +#endif // CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_PERMISSIONS_H_
|
|
|