OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/extension_permission_set.h" | 5 #include "chrome/common/extensions/extension_permission_set.h" |
6 | 6 |
7 #include "base/json/json_value_serializer.h" | 7 #include "base/json/json_value_serializer.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 | 616 |
617 // TODO(erikkay) add a string for this permission. | 617 // TODO(erikkay) add a string for this permission. |
618 skip.insert(ExtensionAPIPermission::kBackground); | 618 skip.insert(ExtensionAPIPermission::kBackground); |
619 | 619 |
620 skip.insert(ExtensionAPIPermission::kClipboardWrite); | 620 skip.insert(ExtensionAPIPermission::kClipboardWrite); |
621 | 621 |
622 // The cookie permission does nothing unless you have associated host | 622 // The cookie permission does nothing unless you have associated host |
623 // permissions. | 623 // permissions. |
624 skip.insert(ExtensionAPIPermission::kCookie); | 624 skip.insert(ExtensionAPIPermission::kCookie); |
625 | 625 |
626 // The proxy permission is warned as part of host permission checks. | 626 // The proxy, webNavigation, and webRequest permissions are warned as part of |
| 627 // host permission checks. |
627 skip.insert(ExtensionAPIPermission::kProxy); | 628 skip.insert(ExtensionAPIPermission::kProxy); |
| 629 skip.insert(ExtensionAPIPermission::kWebNavigation); |
| 630 skip.insert(ExtensionAPIPermission::kWebRequest); |
628 | 631 |
629 // This permission requires explicit user action (context menu handler) | 632 // This permission requires explicit user action (context menu handler) |
630 // so we won't prompt for it for now. | 633 // so we won't prompt for it for now. |
631 skip.insert(ExtensionAPIPermission::kFileBrowserHandler); | 634 skip.insert(ExtensionAPIPermission::kFileBrowserHandler); |
632 | 635 |
633 // If you've turned on the experimental command-line flag, we don't need | 636 // If you've turned on the experimental command-line flag, we don't need |
634 // to warn you further. | 637 // to warn you further. |
635 skip.insert(ExtensionAPIPermission::kExperimental); | 638 skip.insert(ExtensionAPIPermission::kExperimental); |
636 | 639 |
637 // These are private. | 640 // These are private. |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1096 AddPattern(&non_empty_extent, "http://www.google.com/*"); | 1099 AddPattern(&non_empty_extent, "http://www.google.com/*"); |
1097 | 1100 |
1098 perm_set = new ExtensionPermissionSet( | 1101 perm_set = new ExtensionPermissionSet( |
1099 empty_apis, non_empty_extent, empty_extent); | 1102 empty_apis, non_empty_extent, empty_extent); |
1100 EXPECT_FALSE(perm_set->IsEmpty()); | 1103 EXPECT_FALSE(perm_set->IsEmpty()); |
1101 | 1104 |
1102 perm_set = new ExtensionPermissionSet( | 1105 perm_set = new ExtensionPermissionSet( |
1103 empty_apis, empty_extent, non_empty_extent); | 1106 empty_apis, empty_extent, non_empty_extent); |
1104 EXPECT_FALSE(perm_set->IsEmpty()); | 1107 EXPECT_FALSE(perm_set->IsEmpty()); |
1105 } | 1108 } |
OLD | NEW |