Explicitly add python-numpy dependency to install-build-deps.
[chromium-blink-merge.git] / extensions / common / permissions / permission_message_util.h
blob1046bfb55869eb95c136c6b2d2962e7b1b79b5ff
1 // Copyright 2014 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 EXTENSIONS_COMMON_PERMISSIONS_PERMISSION_MESSAGE_UTIL_H_
6 #define EXTENSIONS_COMMON_PERMISSIONS_PERMISSION_MESSAGE_UTIL_H_
8 #include <set>
9 #include <string>
11 namespace extensions {
12 class PermissionMessage;
13 class PermissionSet;
14 class URLPatternSet;
17 namespace permission_message_util {
19 enum PermissionMessageProperties { kReadOnly, kReadWrite };
21 // Creates the corresponding permission message for a list of hosts.
22 // The messages change depending on how many hosts are present, and whether
23 // |read_only| is true.
24 extensions::PermissionMessage CreateFromHostList(
25 const std::set<std::string>& hosts,
26 PermissionMessageProperties);
28 std::set<std::string> GetDistinctHosts(
29 const extensions::URLPatternSet& host_patterns,
30 bool include_rcd,
31 bool exclude_file_scheme);
33 } // namespace permission_message_util
35 #endif // EXTENSIONS_COMMON_PERMISSIONS_PERMISSION_MESSAGE_UTIL_H_