OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/api_permission.h" | 5 #include "extensions/common/permissions/api_permission.h" |
6 | 6 |
7 #include "ui/base/l10n/l10n_util.h" | 7 #include "ui/base/l10n/l10n_util.h" |
8 | 8 |
9 namespace { | 9 namespace { |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... |
40 CHECK_EQ(info(), rhs->info()); | 40 CHECK_EQ(info(), rhs->info()); |
41 return true; | 41 return true; |
42 } | 42 } |
43 | 43 |
44 virtual bool Equal(const APIPermission* rhs) const OVERRIDE { | 44 virtual bool Equal(const APIPermission* rhs) const OVERRIDE { |
45 if (this != rhs) | 45 if (this != rhs) |
46 CHECK_EQ(info(), rhs->info()); | 46 CHECK_EQ(info(), rhs->info()); |
47 return true; | 47 return true; |
48 } | 48 } |
49 | 49 |
50 virtual bool FromValue(const base::Value* value, | 50 virtual bool FromValue( |
51 std::string* /*error*/) OVERRIDE { | 51 const base::Value* value, |
| 52 std::string* /*error*/, |
| 53 std::vector<std::string>* /*unhandled_permissions*/) OVERRIDE { |
52 return (value == NULL); | 54 return (value == NULL); |
53 } | 55 } |
54 | 56 |
55 virtual scoped_ptr<base::Value> ToValue() const OVERRIDE { | 57 virtual scoped_ptr<base::Value> ToValue() const OVERRIDE { |
56 return scoped_ptr<base::Value>(); | 58 return scoped_ptr<base::Value>(); |
57 } | 59 } |
58 | 60 |
59 virtual APIPermission* Clone() const OVERRIDE { | 61 virtual APIPermission* Clone() const OVERRIDE { |
60 return new SimpleAPIPermission(info()); | 62 return new SimpleAPIPermission(info()); |
61 } | 63 } |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 return api_permission_constructor_ ? | 134 return api_permission_constructor_ ? |
133 api_permission_constructor_(this) : new SimpleAPIPermission(this); | 135 api_permission_constructor_(this) : new SimpleAPIPermission(this); |
134 } | 136 } |
135 | 137 |
136 PermissionMessage APIPermissionInfo::GetMessage_() const { | 138 PermissionMessage APIPermissionInfo::GetMessage_() const { |
137 return PermissionMessage( | 139 return PermissionMessage( |
138 message_id_, l10n_util::GetStringUTF16(l10n_message_id_)); | 140 message_id_, l10n_util::GetStringUTF16(l10n_message_id_)); |
139 } | 141 } |
140 | 142 |
141 } // namespace extensions | 143 } // namespace extensions |
OLD | NEW |