| 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 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 | 641 |
| 642 // TODO(erikkay) add a string for this permission. | 642 // TODO(erikkay) add a string for this permission. |
| 643 skip.insert(ExtensionAPIPermission::kBackground); | 643 skip.insert(ExtensionAPIPermission::kBackground); |
| 644 | 644 |
| 645 skip.insert(ExtensionAPIPermission::kClipboardWrite); | 645 skip.insert(ExtensionAPIPermission::kClipboardWrite); |
| 646 | 646 |
| 647 // The cookie permission does nothing unless you have associated host | 647 // The cookie permission does nothing unless you have associated host |
| 648 // permissions. | 648 // permissions. |
| 649 skip.insert(ExtensionAPIPermission::kCookie); | 649 skip.insert(ExtensionAPIPermission::kCookie); |
| 650 | 650 |
| 651 // The proxy, webNavigation, and webRequest permissions are warned as part of | 651 // The proxy, and webRequest permissions are warned as part of host |
| 652 // host permission checks. | 652 // permission checks. |
| 653 skip.insert(ExtensionAPIPermission::kProxy); | 653 skip.insert(ExtensionAPIPermission::kProxy); |
| 654 skip.insert(ExtensionAPIPermission::kWebNavigation); | |
| 655 skip.insert(ExtensionAPIPermission::kWebRequest); | 654 skip.insert(ExtensionAPIPermission::kWebRequest); |
| 656 skip.insert(ExtensionAPIPermission::kWebRequestBlocking); | 655 skip.insert(ExtensionAPIPermission::kWebRequestBlocking); |
| 657 | 656 |
| 658 // This permission requires explicit user action (context menu handler) | 657 // This permission requires explicit user action (context menu handler) |
| 659 // so we won't prompt for it for now. | 658 // so we won't prompt for it for now. |
| 660 skip.insert(ExtensionAPIPermission::kFileBrowserHandler); | 659 skip.insert(ExtensionAPIPermission::kFileBrowserHandler); |
| 661 | 660 |
| 662 // If you've turned on the experimental command-line flag, we don't need | 661 // If you've turned on the experimental command-line flag, we don't need |
| 663 // to warn you further. | 662 // to warn you further. |
| 664 skip.insert(ExtensionAPIPermission::kExperimental); | 663 skip.insert(ExtensionAPIPermission::kExperimental); |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1127 AddPattern(&non_empty_extent, "http://www.google.com/*"); | 1126 AddPattern(&non_empty_extent, "http://www.google.com/*"); |
| 1128 | 1127 |
| 1129 perm_set = new ExtensionPermissionSet( | 1128 perm_set = new ExtensionPermissionSet( |
| 1130 empty_apis, non_empty_extent, empty_extent); | 1129 empty_apis, non_empty_extent, empty_extent); |
| 1131 EXPECT_FALSE(perm_set->IsEmpty()); | 1130 EXPECT_FALSE(perm_set->IsEmpty()); |
| 1132 | 1131 |
| 1133 perm_set = new ExtensionPermissionSet( | 1132 perm_set = new ExtensionPermissionSet( |
| 1134 empty_apis, empty_extent, non_empty_extent); | 1133 empty_apis, empty_extent, non_empty_extent); |
| 1135 EXPECT_FALSE(perm_set->IsEmpty()); | 1134 EXPECT_FALSE(perm_set->IsEmpty()); |
| 1136 } | 1135 } |
| OLD | NEW |