| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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_COMMON_EXTENSIONS_PERMISSIONS_PERMISSION_MESSAGE_UTIL_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_PERMISSIONS_PERMISSION_MESSAGE_UTIL_H_ |
| 6 #define CHROME_COMMON_EXTENSIONS_PERMISSIONS_PERMISSION_MESSAGE_UTIL_H_ | 6 #define CHROME_COMMON_EXTENSIONS_PERMISSIONS_PERMISSION_MESSAGE_UTIL_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 namespace extensions { | 11 namespace extensions { |
| 12 class PermissionMessage; | 12 class PermissionMessage; |
| 13 class PermissionSet; |
| 14 class URLPatternSet; |
| 13 } | 15 } |
| 14 | 16 |
| 15 namespace permission_message_util { | 17 namespace permission_message_util { |
| 16 | 18 |
| 17 // Creates the corresponding permission message for a list of hosts. | 19 // Creates the corresponding permission message for a list of hosts. |
| 18 // The messages change depending on what hosts are present. | 20 // The messages change depending on what hosts are present. |
| 19 extensions::PermissionMessage CreateFromHostList( | 21 extensions::PermissionMessage CreateFromHostList( |
| 20 const std::set<std::string>& hosts); | 22 const std::set<std::string>& hosts); |
| 21 | 23 |
| 24 std::set<std::string> GetDistinctHosts( |
| 25 const extensions::URLPatternSet& host_patterns, |
| 26 bool include_rcd, |
| 27 bool exclude_file_scheme); |
| 28 |
| 22 } // namespace permission_message_util | 29 } // namespace permission_message_util |
| 23 | 30 |
| 24 #endif // CHROME_COMMON_EXTENSIONS_PERMISSIONS_PERMISSION_MESSAGE_UTIL_H_ | 31 #endif // CHROME_COMMON_EXTENSIONS_PERMISSIONS_PERMISSION_MESSAGE_UTIL_H_ |
| OLD | NEW |