1 // Copyright 2013 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.
5 #ifndef CHROME_COMMON_PEPPER_PERMISSION_UTIL_H_
6 #define CHROME_COMMON_PEPPER_PERMISSION_UTIL_H_
16 // Returns true if the extension (or an imported module if any) is whitelisted.
17 bool IsExtensionOrSharedModuleWhitelisted(
19 const ExtensionSet* extension_set,
20 const std::set<std::string>& whitelist);
22 // Checks whether the host of |url| is allowed by |command_line_switch|.
24 // If the value of |command_line_switch| is:
25 // (1) '*': returns true for any packaged or platform apps;
26 // (2) a list of host names separated by ',': returns true if |host| is in the
27 // list. (NOTE: In this case, |url| doesn't have to belong to an extension.)
28 bool IsHostAllowedByCommandLine(const GURL& url,
29 const ExtensionSet* extension_set,
30 const char* command_line_switch);
33 #endif // CHROME_COMMON_PEPPER_PERMISSION_UTIL_H_