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 "chrome/common/extensions/permissions/permissions_info.h" | 5 #include "chrome/common/extensions/permissions/permissions_info.h" |
6 | 6 |
| 7 #include "base/logging.h" |
| 8 |
7 namespace extensions { | 9 namespace extensions { |
8 | 10 |
9 // static | 11 // static |
10 PermissionsInfo* PermissionsInfo::GetInstance() { | 12 PermissionsInfo* PermissionsInfo::GetInstance() { |
11 return Singleton<PermissionsInfo>::get(); | 13 return Singleton<PermissionsInfo>::get(); |
12 } | 14 } |
13 | 15 |
14 APIPermission* PermissionsInfo::GetByID( | 16 APIPermission* PermissionsInfo::GetByID( |
15 APIPermission::ID id) { | 17 APIPermission::ID id) { |
16 IDMap::iterator i = id_map_.find(id); | 18 IDMap::iterator i = id_map_.find(id); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 77 |
76 id_map_[id] = permission; | 78 id_map_[id] = permission; |
77 name_map_[name] = permission; | 79 name_map_[name] = permission; |
78 | 80 |
79 permission_count_++; | 81 permission_count_++; |
80 | 82 |
81 return permission; | 83 return permission; |
82 } | 84 } |
83 | 85 |
84 } // namespace extensions | 86 } // namespace extensions |
OLD | NEW |