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