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

Side by Side Diff: chrome/renderer/extensions/extension_resource_request_policy.h

Issue 9805004: Add a helpful error in case web-inaccessible request. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: change message Created 8 years, 9 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
« no previous file with comments | « no previous file | chrome/renderer/extensions/extension_resource_request_policy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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 namespace WebKit { 11 namespace WebKit {
12 class WebFrame; 12 class WebFrame;
13 } 13 }
14 14
15 // Encapsulates the policy for when chrome-extension:// URLs can be requested. 15 // Encapsulates the policy for when chrome-extension:// URLs can be requested.
16 class ExtensionResourceRequestPolicy { 16 class ExtensionResourceRequestPolicy {
17 public: 17 public:
18 // Returns true if the |resource_url| can be requested from |frame_url|. 18 // Returns true if the |resource_url| can be requested from |frame_url|.
19 static bool CanRequestResource(const GURL& resource_url, 19 static bool CanRequestResource(const GURL& resource_url,
20 const WebKit::WebFrame* frame, 20 WebKit::WebFrame* frame,
21 const ExtensionSet* loaded_extensions); 21 const ExtensionSet* loaded_extensions);
22 22
23 private: 23 private:
24 ExtensionResourceRequestPolicy(); 24 ExtensionResourceRequestPolicy();
25 }; 25 };
26 26
27 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_RESOURCE_REQUEST_POLICY_H_ 27 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_RESOURCE_REQUEST_POLICY_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/extensions/extension_resource_request_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698