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/stl_util.h" | 7 #include "base/stl_util.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "chrome/grit/generated_resources.h" | 9 #include "chrome/grit/generated_resources.h" |
10 #include "extensions/common/permissions/api_permission_set.h" | 10 #include "extensions/common/permissions/api_permission_set.h" |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 // The warning message for declarativeWebRequest | 388 // The warning message for declarativeWebRequest |
389 // permissions speaks about blocking parts of pages, which is a | 389 // permissions speaks about blocking parts of pages, which is a |
390 // subset of what the "<all_urls>" access allows. Therefore we | 390 // subset of what the "<all_urls>" access allows. Therefore we |
391 // display only the "<all_urls>" warning message if both permissions | 391 // display only the "<all_urls>" warning message if both permissions |
392 // are required. | 392 // are required. |
393 {IDS_EXTENSION_PROMPT_WARNING_ALL_HOSTS, | 393 {IDS_EXTENSION_PROMPT_WARNING_ALL_HOSTS, |
394 {APIPermission::kHostsAll}, | 394 {APIPermission::kHostsAll}, |
395 {APIPermission::kDeclarativeWebRequest, | 395 {APIPermission::kDeclarativeWebRequest, |
396 APIPermission::kTopSites, | 396 APIPermission::kTopSites, |
397 APIPermission::kTab, | 397 APIPermission::kTab, |
| 398 APIPermission::kTabGlobal, |
398 APIPermission::kFavicon, | 399 APIPermission::kFavicon, |
399 APIPermission::kTopSites, | 400 APIPermission::kTopSites, |
400 APIPermission::kHostsAllReadOnly}}, | 401 APIPermission::kHostsAllReadOnly}}, |
401 // AutomationManifestPermission: | 402 // AutomationManifestPermission: |
402 {IDS_EXTENSION_PROMPT_WARNING_ALL_HOSTS_READ_ONLY, | 403 {IDS_EXTENSION_PROMPT_WARNING_ALL_HOSTS_READ_ONLY, |
403 {APIPermission::kHostsAllReadOnly}, | 404 {APIPermission::kHostsAllReadOnly}, |
404 {}}, | 405 {}}, |
405 // Tabs already allows reading favicons and reading the list of most | 406 // Tabs already allows reading favicons and reading the list of most |
406 // frequently visited sites. | 407 // frequently visited sites. |
407 {IDS_EXTENSION_PROMPT_WARNING_HISTORY_READ, | 408 {IDS_EXTENSION_PROMPT_WARNING_HISTORY_READ, |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
660 APIPermission::ID permission_four, | 661 APIPermission::ID permission_four, |
661 APIPermission::ID permission_five, | 662 APIPermission::ID permission_five, |
662 APIPermission::ID permission_six) { | 663 APIPermission::ID permission_six) { |
663 insert(permission_one); | 664 insert(permission_one); |
664 insert(permission_two); | 665 insert(permission_two); |
665 insert(permission_three); | 666 insert(permission_three); |
666 insert(permission_four); | 667 insert(permission_four); |
667 insert(permission_five); | 668 insert(permission_five); |
668 insert(permission_six); | 669 insert(permission_six); |
669 } | 670 } |
| 671 ChromePermissionMessageRule::PermissionIDSetInitializer:: |
| 672 PermissionIDSetInitializer(APIPermission::ID permission_one, |
| 673 APIPermission::ID permission_two, |
| 674 APIPermission::ID permission_three, |
| 675 APIPermission::ID permission_four, |
| 676 APIPermission::ID permission_five, |
| 677 APIPermission::ID permission_six, |
| 678 APIPermission::ID permission_seven) { |
| 679 insert(permission_one); |
| 680 insert(permission_two); |
| 681 insert(permission_three); |
| 682 insert(permission_four); |
| 683 insert(permission_five); |
| 684 insert(permission_six); |
| 685 insert(permission_seven); |
| 686 } |
670 | 687 |
671 ChromePermissionMessageRule::PermissionIDSetInitializer:: | 688 ChromePermissionMessageRule::PermissionIDSetInitializer:: |
672 ~PermissionIDSetInitializer() { | 689 ~PermissionIDSetInitializer() { |
673 } | 690 } |
674 | 691 |
675 } // namespace extensions | 692 } // namespace extensions |
OLD | NEW |