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 #include "chrome/common/extensions/permissions/chrome_permission_message_rules.h
" | 5 #include "chrome/common/extensions/permissions/chrome_permission_message_rules.h
" |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 ChromePermissionMessageRule::ChromePermissionMessageRule( | 287 ChromePermissionMessageRule::ChromePermissionMessageRule( |
288 ChromePermissionMessageFormatter* formatter, | 288 ChromePermissionMessageFormatter* formatter, |
289 const PermissionIDSetInitializer& required, | 289 const PermissionIDSetInitializer& required, |
290 const PermissionIDSetInitializer& optional) | 290 const PermissionIDSetInitializer& optional) |
291 : required_permissions_(required), | 291 : required_permissions_(required), |
292 optional_permissions_(optional), | 292 optional_permissions_(optional), |
293 formatter_(formatter) { | 293 formatter_(formatter) { |
294 DCHECK(!required_permissions_.empty()); | 294 DCHECK(!required_permissions_.empty()); |
295 } | 295 } |
296 | 296 |
| 297 ChromePermissionMessageRule::ChromePermissionMessageRule( |
| 298 const ChromePermissionMessageRule& other) = default; |
| 299 |
297 ChromePermissionMessageRule::~ChromePermissionMessageRule() { | 300 ChromePermissionMessageRule::~ChromePermissionMessageRule() { |
298 } | 301 } |
299 | 302 |
300 std::set<APIPermission::ID> ChromePermissionMessageRule::required_permissions() | 303 std::set<APIPermission::ID> ChromePermissionMessageRule::required_permissions() |
301 const { | 304 const { |
302 return required_permissions_; | 305 return required_permissions_; |
303 } | 306 } |
304 std::set<APIPermission::ID> ChromePermissionMessageRule::optional_permissions() | 307 std::set<APIPermission::ID> ChromePermissionMessageRule::optional_permissions() |
305 const { | 308 const { |
306 return optional_permissions_; | 309 return optional_permissions_; |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
650 {IDS_EXTENSION_PROMPT_WARNING_DISPLAY_SOURCE, | 653 {IDS_EXTENSION_PROMPT_WARNING_DISPLAY_SOURCE, |
651 {APIPermission::kDisplaySource}, | 654 {APIPermission::kDisplaySource}, |
652 {}}, | 655 {}}, |
653 }; | 656 }; |
654 | 657 |
655 return std::vector<ChromePermissionMessageRule>( | 658 return std::vector<ChromePermissionMessageRule>( |
656 rules_arr, rules_arr + arraysize(rules_arr)); | 659 rules_arr, rules_arr + arraysize(rules_arr)); |
657 } | 660 } |
658 | 661 |
659 } // namespace extensions | 662 } // namespace extensions |
OLD | NEW |