Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 EXTENSIONS_COMMON_PERMISSIONS_PERMISSION_MESSAGE_UTIL_H_ | 5 #ifndef EXTENSIONS_COMMON_PERMISSIONS_PERMISSION_MESSAGE_UTIL_H_ |
| 6 #define EXTENSIONS_COMMON_PERMISSIONS_PERMISSION_MESSAGE_UTIL_H_ | 6 #define EXTENSIONS_COMMON_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; | 13 class PermissionSet; |
| 14 class URLPatternSet; | 14 class URLPatternSet; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace permission_message_util { | 17 namespace permission_message_util { |
| 18 | 18 |
| 19 enum PermissionMessageProperties { | |
| 20 kReadOnly = 0, | |
|
not at google - send to devlin
2014/07/25 20:40:03
is the = 0, =1 really necessary?
aboxhall
2014/07/25 20:54:22
Done.
| |
| 21 kReadWrite = 1 | |
| 22 }; | |
| 23 | |
| 19 // Creates the corresponding permission message for a list of hosts. | 24 // Creates the corresponding permission message for a list of hosts. |
| 20 // The messages change depending on what hosts are present. | 25 // The messages change depending on how many hosts are present, and whether |
| 26 // |read_only| is true. | |
| 21 extensions::PermissionMessage CreateFromHostList( | 27 extensions::PermissionMessage CreateFromHostList( |
| 22 const std::set<std::string>& hosts); | 28 const std::set<std::string>& hosts, |
| 29 PermissionMessageProperties); | |
| 23 | 30 |
| 24 std::set<std::string> GetDistinctHosts( | 31 std::set<std::string> GetDistinctHosts( |
| 25 const extensions::URLPatternSet& host_patterns, | 32 const extensions::URLPatternSet& host_patterns, |
| 26 bool include_rcd, | 33 bool include_rcd, |
| 27 bool exclude_file_scheme); | 34 bool exclude_file_scheme); |
|
not at google - send to devlin
2014/07/25 20:40:03
was this clang-format? it shouldn't be indented.
| |
| 28 | 35 |
| 29 } // namespace permission_message_util | 36 } // namespace permission_message_util |
| 30 | 37 |
| 31 #endif // EXTENSIONS_COMMON_PERMISSIONS_PERMISSION_MESSAGE_UTIL_H_ | 38 #endif // EXTENSIONS_COMMON_PERMISSIONS_PERMISSION_MESSAGE_UTIL_H_ |
| OLD | NEW |