OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_RENDERER_EXTENSIONS_EXTENSION_RESOURCE_REQUEST_POLICY_H_ | 5 #ifndef CHROME_RENDERER_EXTENSIONS_EXTENSION_RESOURCE_REQUEST_POLICY_H_ |
6 #define CHROME_RENDERER_EXTENSIONS_EXTENSION_RESOURCE_REQUEST_POLICY_H_ | 6 #define CHROME_RENDERER_EXTENSIONS_EXTENSION_RESOURCE_REQUEST_POLICY_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 class ExtensionSet; | 9 class ExtensionSet; |
10 class GURL; | 10 class GURL; |
11 | 11 |
12 // Encapsulates the policy for when chrome-extension:// URLs can be requested. | 12 // Encapsulates the policy for when chrome-extension:// URLs can be requested. |
13 class ExtensionResourceRequestPolicy { | 13 class ExtensionResourceRequestPolicy { |
14 public: | 14 public: |
15 // Returns true if the |resource_url| can be requested from |frame_url|. | 15 // Returns true if the |resource_url| can be requested from |frame_url|. |
16 static bool CanRequestResource(const GURL& resource_url, | 16 static bool CanRequestResource(const GURL& resource_url, |
17 const GURL& frame_url, | 17 const GURL& frame_url, |
18 const ExtensionSet* loaded_extensions); | 18 const ExtensionSet* loaded_extensions); |
19 | 19 |
20 private: | 20 private: |
21 ExtensionResourceRequestPolicy(); | 21 ExtensionResourceRequestPolicy(); |
22 }; | 22 }; |
23 | 23 |
24 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_RESOURCE_REQUEST_POLICY_H_ | 24 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_RESOURCE_REQUEST_POLICY_H_ |
OLD | NEW |