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/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/common/chrome_paths.h" | 10 #include "chrome/common/chrome_paths.h" |
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 skip.insert(APIPermission::kWallpaperPrivate); | 601 skip.insert(APIPermission::kWallpaperPrivate); |
602 skip.insert(APIPermission::kWebRequestInternal); | 602 skip.insert(APIPermission::kWebRequestInternal); |
603 skip.insert(APIPermission::kWebSocketProxyPrivate); | 603 skip.insert(APIPermission::kWebSocketProxyPrivate); |
604 skip.insert(APIPermission::kWebstorePrivate); | 604 skip.insert(APIPermission::kWebstorePrivate); |
605 | 605 |
606 // Warned as part of host permissions. | 606 // Warned as part of host permissions. |
607 skip.insert(APIPermission::kDevtools); | 607 skip.insert(APIPermission::kDevtools); |
608 | 608 |
609 // Platform apps. TODO(miket): must we skip? | 609 // Platform apps. TODO(miket): must we skip? |
610 skip.insert(APIPermission::kFileSystem); | 610 skip.insert(APIPermission::kFileSystem); |
| 611 skip.insert(APIPermission::kSerial); |
611 skip.insert(APIPermission::kSocket); | 612 skip.insert(APIPermission::kSocket); |
612 skip.insert(APIPermission::kUsb); | |
613 | 613 |
614 PermissionsInfo* info = PermissionsInfo::GetInstance(); | 614 PermissionsInfo* info = PermissionsInfo::GetInstance(); |
615 APIPermissionSet permissions = info->GetAll(); | 615 APIPermissionSet permissions = info->GetAll(); |
616 for (APIPermissionSet::const_iterator i = permissions.begin(); | 616 for (APIPermissionSet::const_iterator i = permissions.begin(); |
617 i != permissions.end(); ++i) { | 617 i != permissions.end(); ++i) { |
618 APIPermission* permission = info->GetByID(*i); | 618 APIPermission* permission = info->GetByID(*i); |
619 EXPECT_TRUE(permission); | 619 EXPECT_TRUE(permission); |
620 if (skip.count(*i)) { | 620 if (skip.count(*i)) { |
621 EXPECT_EQ(PermissionMessage::kNone, permission->message_id()) | 621 EXPECT_EQ(PermissionMessage::kNone, permission->message_id()) |
622 << "unexpected message_id for " << permission->name(); | 622 << "unexpected message_id for " << permission->name(); |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1147 apis.insert(APIPermission::kWebRequest); | 1147 apis.insert(APIPermission::kWebRequest); |
1148 apis.insert(APIPermission::kFileBrowserHandler); | 1148 apis.insert(APIPermission::kFileBrowserHandler); |
1149 EXPECT_EQ(2U, apis.size()); | 1149 EXPECT_EQ(2U, apis.size()); |
1150 | 1150 |
1151 scoped_refptr<PermissionSet> perm_set; | 1151 scoped_refptr<PermissionSet> perm_set; |
1152 perm_set = new PermissionSet(apis, empty_extent, empty_extent); | 1152 perm_set = new PermissionSet(apis, empty_extent, empty_extent); |
1153 EXPECT_EQ(4U, perm_set->apis().size()); | 1153 EXPECT_EQ(4U, perm_set->apis().size()); |
1154 } | 1154 } |
1155 | 1155 |
1156 } // namespace extensions | 1156 } // namespace extensions |
OLD | NEW |