summaryrefslogtreecommitdiffstats
path: root/chrome/common/pepper_permission_util.h
blob: 8ff9e843c328eac2f08cbe830246425a3a83873c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_COMMON_PEPPER_PERMISSION_UTIL_H_
#define CHROME_COMMON_PEPPER_PERMISSION_UTIL_H_

#include <set>
#include <string>

class ExtensionSet;
class GURL;

namespace chrome {

// Returns true if the extension (or an imported module if any) is whitelisted,
// or appears in command_line_switch.
bool IsExtensionOrSharedModuleWhitelisted(
    const GURL& url,
    const ExtensionSet* extension_set,
    const std::set<std::string>& whitelist,
    const char* command_line_switch);

}  // namespace chrome

#endif  // CHROME_COMMON_PEPPER_PERMISSION_UTIL_H_