OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/json/json_file_value_serializer.h" | 6 #include "base/json/json_file_value_serializer.h" |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/common/chrome_paths.h" | 10 #include "chrome/common/chrome_paths.h" |
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
763 | 763 |
764 // Warned as part of host permissions. | 764 // Warned as part of host permissions. |
765 skip.insert(APIPermission::kDevtools); | 765 skip.insert(APIPermission::kDevtools); |
766 | 766 |
767 // Platform apps. | 767 // Platform apps. |
768 skip.insert(APIPermission::kBluetooth); | 768 skip.insert(APIPermission::kBluetooth); |
769 skip.insert(APIPermission::kFileSystem); | 769 skip.insert(APIPermission::kFileSystem); |
770 skip.insert(APIPermission::kFileSystemProvider); | 770 skip.insert(APIPermission::kFileSystemProvider); |
771 skip.insert(APIPermission::kFileSystemRetainEntries); | 771 skip.insert(APIPermission::kFileSystemRetainEntries); |
772 skip.insert(APIPermission::kSocket); | 772 skip.insert(APIPermission::kSocket); |
773 skip.insert(APIPermission::kSocketsUdp); | |
774 skip.insert(APIPermission::kUsbDevice); | 773 skip.insert(APIPermission::kUsbDevice); |
775 | 774 |
776 PermissionsInfo* info = PermissionsInfo::GetInstance(); | 775 PermissionsInfo* info = PermissionsInfo::GetInstance(); |
777 APIPermissionSet permissions = info->GetAll(); | 776 APIPermissionSet permissions = info->GetAll(); |
778 for (APIPermissionSet::const_iterator i = permissions.begin(); | 777 for (APIPermissionSet::const_iterator i = permissions.begin(); |
779 i != permissions.end(); ++i) { | 778 i != permissions.end(); ++i) { |
780 const APIPermissionInfo* permission_info = i->info(); | 779 const APIPermissionInfo* permission_info = i->info(); |
781 EXPECT_TRUE(permission_info != NULL); | 780 EXPECT_TRUE(permission_info != NULL); |
782 | 781 |
783 if (skip.count(i->id())) { | 782 if (skip.count(i->id())) { |
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1486 scoped_refptr<const PermissionSet> permissions_dwr( | 1485 scoped_refptr<const PermissionSet> permissions_dwr( |
1487 extension_dwr->GetActivePermissions()); | 1486 extension_dwr->GetActivePermissions()); |
1488 | 1487 |
1489 EXPECT_FALSE(PermissionMessageProvider::Get()-> | 1488 EXPECT_FALSE(PermissionMessageProvider::Get()-> |
1490 IsPrivilegeIncrease(permissions.get(), | 1489 IsPrivilegeIncrease(permissions.get(), |
1491 permissions_dwr.get(), | 1490 permissions_dwr.get(), |
1492 extension->GetType())); | 1491 extension->GetType())); |
1493 } | 1492 } |
1494 | 1493 |
1495 } // namespace extensions | 1494 } // namespace extensions |
OLD | NEW |