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

Side by Side Diff: chrome/browser/extensions/api/web_request/web_request_permissions.h

Issue 10825102: Protect Chrome WebStore based on process IDs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed unit test Created 8 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 #ifndef CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_PERMISSIONS_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_PERMISSIONS_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_PERMISSIONS_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_PERMISSIONS_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 12
13 class ExtensionInfoMap; 13 class ExtensionInfoMap;
14 class GURL; 14 class GURL;
15 15
16 namespace net { 16 namespace net {
17 class URLRequest; 17 class URLRequest;
18 } 18 }
19 19
20 // This class is used to test whether extensions may modify web requests. 20 // This class is used to test whether extensions may modify web requests.
21 class WebRequestPermissions { 21 class WebRequestPermissions {
22 public: 22 public:
23 // Returns true if the request shall not be reported to extensions. 23 // Returns true if the request shall not be reported to extensions.
24 static bool HideRequest(const net::URLRequest* request); 24 static bool HideRequest(const ExtensionInfoMap* extension_info_map,
25 const net::URLRequest* request);
25 26
26 static bool CanExtensionAccessURL(const ExtensionInfoMap* extension_info_map, 27 static bool CanExtensionAccessURL(const ExtensionInfoMap* extension_info_map,
27 const std::string& extension_id, 28 const std::string& extension_id,
28 const GURL& url, 29 const GURL& url,
29 bool crosses_incognito, 30 bool crosses_incognito,
30 bool enforce_host_permissions); 31 bool enforce_host_permissions);
31 32
32 private: 33 private:
33 DISALLOW_IMPLICIT_CONSTRUCTORS(WebRequestPermissions); 34 DISALLOW_IMPLICIT_CONSTRUCTORS(WebRequestPermissions);
34 }; 35 };
35 36
36 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_PERMISSIONS_H_ 37 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_PERMISSIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698