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