Test for golden version-7 safe-browsing file.
[chromium-blink-merge.git] / chrome / common / pepper_permission_util.h
blob58a20e5fb16cc5b20bc136c9fb12c696557bb4a4
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_
8 #include <set>
9 #include <string>
11 class GURL;
13 namespace extensions {
14 class ExtensionSet;
17 namespace chrome {
19 // Returns true if the extension (or an imported module if any) is whitelisted.
20 bool IsExtensionOrSharedModuleWhitelisted(
21 const GURL& url,
22 const extensions::ExtensionSet* extension_set,
23 const std::set<std::string>& whitelist);
25 // Checks whether the host of |url| is allowed by |command_line_switch|.
27 // If the value of |command_line_switch| is:
28 // (1) '*': returns true for any packaged or platform apps;
29 // (2) a list of host names separated by ',': returns true if |host| is in the
30 // list. (NOTE: In this case, |url| doesn't have to belong to an extension.)
31 bool IsHostAllowedByCommandLine(const GURL& url,
32 const extensions::ExtensionSet* extension_set,
33 const char* command_line_switch);
34 } // namespace chrome
36 #endif // CHROME_COMMON_PEPPER_PERMISSION_UTIL_H_