| 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 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 | 615 |
| 616 // TODO(erikkay) add a string for this permission. | 616 // TODO(erikkay) add a string for this permission. |
| 617 skip.insert(ExtensionAPIPermission::kBackground); | 617 skip.insert(ExtensionAPIPermission::kBackground); |
| 618 | 618 |
| 619 skip.insert(ExtensionAPIPermission::kClipboardWrite); | 619 skip.insert(ExtensionAPIPermission::kClipboardWrite); |
| 620 | 620 |
| 621 // The cookie permission does nothing unless you have associated host | 621 // The cookie permission does nothing unless you have associated host |
| 622 // permissions. | 622 // permissions. |
| 623 skip.insert(ExtensionAPIPermission::kCookie); | 623 skip.insert(ExtensionAPIPermission::kCookie); |
| 624 | 624 |
| 625 // The proxy permission is warned as part of host permission checks. | 625 // The proxy, webNavigation, and webRequest permissions are warned as part of |
| 626 // host permission checks. |
| 626 skip.insert(ExtensionAPIPermission::kProxy); | 627 skip.insert(ExtensionAPIPermission::kProxy); |
| 628 skip.insert(ExtensionAPIPermission::kWebNavigation); |
| 629 skip.insert(ExtensionAPIPermission::kWebRequest); |
| 627 | 630 |
| 628 // This permission requires explicit user action (context menu handler) | 631 // This permission requires explicit user action (context menu handler) |
| 629 // so we won't prompt for it for now. | 632 // so we won't prompt for it for now. |
| 630 skip.insert(ExtensionAPIPermission::kFileBrowserHandler); | 633 skip.insert(ExtensionAPIPermission::kFileBrowserHandler); |
| 631 | 634 |
| 632 // If you've turned on the experimental command-line flag, we don't need | 635 // If you've turned on the experimental command-line flag, we don't need |
| 633 // to warn you further. | 636 // to warn you further. |
| 634 skip.insert(ExtensionAPIPermission::kExperimental); | 637 skip.insert(ExtensionAPIPermission::kExperimental); |
| 635 | 638 |
| 636 // These are private. | 639 // These are private. |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1092 AddPattern(&non_empty_extent, "http://www.google.com/*"); | 1095 AddPattern(&non_empty_extent, "http://www.google.com/*"); |
| 1093 | 1096 |
| 1094 perm_set = new ExtensionPermissionSet( | 1097 perm_set = new ExtensionPermissionSet( |
| 1095 empty_apis, non_empty_extent, empty_extent); | 1098 empty_apis, non_empty_extent, empty_extent); |
| 1096 EXPECT_FALSE(perm_set->IsEmpty()); | 1099 EXPECT_FALSE(perm_set->IsEmpty()); |
| 1097 | 1100 |
| 1098 perm_set = new ExtensionPermissionSet( | 1101 perm_set = new ExtensionPermissionSet( |
| 1099 empty_apis, empty_extent, non_empty_extent); | 1102 empty_apis, empty_extent, non_empty_extent); |
| 1100 EXPECT_FALSE(perm_set->IsEmpty()); | 1103 EXPECT_FALSE(perm_set->IsEmpty()); |
| 1101 } | 1104 } |
| OLD | NEW |