| 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 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 618 | 618 |
| 619 // The cookie permission does nothing unless you have associated host | 619 // The cookie permission does nothing unless you have associated host |
| 620 // permissions. | 620 // permissions. |
| 621 skip.insert(ExtensionAPIPermission::kCookie); | 621 skip.insert(ExtensionAPIPermission::kCookie); |
| 622 | 622 |
| 623 // The proxy, webNavigation, and webRequest permissions are warned as part of | 623 // The proxy, webNavigation, and webRequest permissions are warned as part of |
| 624 // host permission checks. | 624 // host permission checks. |
| 625 skip.insert(ExtensionAPIPermission::kProxy); | 625 skip.insert(ExtensionAPIPermission::kProxy); |
| 626 skip.insert(ExtensionAPIPermission::kWebNavigation); | 626 skip.insert(ExtensionAPIPermission::kWebNavigation); |
| 627 skip.insert(ExtensionAPIPermission::kWebRequest); | 627 skip.insert(ExtensionAPIPermission::kWebRequest); |
| 628 skip.insert(ExtensionAPIPermission::kWebRequestBlocking); |
| 628 | 629 |
| 629 // This permission requires explicit user action (context menu handler) | 630 // This permission requires explicit user action (context menu handler) |
| 630 // so we won't prompt for it for now. | 631 // so we won't prompt for it for now. |
| 631 skip.insert(ExtensionAPIPermission::kFileBrowserHandler); | 632 skip.insert(ExtensionAPIPermission::kFileBrowserHandler); |
| 632 | 633 |
| 633 // 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 |
| 634 // to warn you further. | 635 // to warn you further. |
| 635 skip.insert(ExtensionAPIPermission::kExperimental); | 636 skip.insert(ExtensionAPIPermission::kExperimental); |
| 636 | 637 |
| 637 // These are private. | 638 // These are private. |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1097 AddPattern(&non_empty_extent, "http://www.google.com/*"); | 1098 AddPattern(&non_empty_extent, "http://www.google.com/*"); |
| 1098 | 1099 |
| 1099 perm_set = new ExtensionPermissionSet( | 1100 perm_set = new ExtensionPermissionSet( |
| 1100 empty_apis, non_empty_extent, empty_extent); | 1101 empty_apis, non_empty_extent, empty_extent); |
| 1101 EXPECT_FALSE(perm_set->IsEmpty()); | 1102 EXPECT_FALSE(perm_set->IsEmpty()); |
| 1102 | 1103 |
| 1103 perm_set = new ExtensionPermissionSet( | 1104 perm_set = new ExtensionPermissionSet( |
| 1104 empty_apis, empty_extent, non_empty_extent); | 1105 empty_apis, empty_extent, non_empty_extent); |
| 1105 EXPECT_FALSE(perm_set->IsEmpty()); | 1106 EXPECT_FALSE(perm_set->IsEmpty()); |
| 1106 } | 1107 } |
| OLD | NEW |