| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/common/permissions/extensions_api_permissions.h" | 5 #include "extensions/common/permissions/extensions_api_permissions.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/ptr_util.h" |
| 12 #include "extensions/common/permissions/api_permission.h" | 13 #include "extensions/common/permissions/api_permission.h" |
| 13 #include "extensions/common/permissions/socket_permission.h" | 14 #include "extensions/common/permissions/socket_permission.h" |
| 14 #include "extensions/common/permissions/usb_device_permission.h" | 15 #include "extensions/common/permissions/usb_device_permission.h" |
| 15 #include "grit/extensions_strings.h" | 16 #include "grit/extensions_strings.h" |
| 16 | 17 |
| 17 namespace extensions { | 18 namespace extensions { |
| 18 | 19 |
| 19 namespace { | 20 namespace { |
| 20 | 21 |
| 21 template <typename T> | 22 template <typename T> |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 105 |
| 105 std::vector<std::unique_ptr<APIPermissionInfo>> permissions; | 106 std::vector<std::unique_ptr<APIPermissionInfo>> permissions; |
| 106 | 107 |
| 107 for (size_t i = 0; i < arraysize(permissions_to_register); ++i) | 108 for (size_t i = 0; i < arraysize(permissions_to_register); ++i) |
| 108 permissions.push_back( | 109 permissions.push_back( |
| 109 base::WrapUnique(new APIPermissionInfo(permissions_to_register[i]))); | 110 base::WrapUnique(new APIPermissionInfo(permissions_to_register[i]))); |
| 110 return permissions; | 111 return permissions; |
| 111 } | 112 } |
| 112 | 113 |
| 113 } // namespace extensions | 114 } // namespace extensions |
| OLD | NEW |