| 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 "extensions/common/permissions/api_permission_set.h" | 7 #include "extensions/common/permissions/api_permission_set.h" |
| 8 #include "ui/base/l10n/l10n_util.h" | 8 #include "ui/base/l10n/l10n_util.h" |
| 9 | 9 |
| 10 namespace { | 10 namespace { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 CHECK_EQ(info(), rhs->info()); | 39 CHECK_EQ(info(), rhs->info()); |
| 40 return true; | 40 return true; |
| 41 } | 41 } |
| 42 | 42 |
| 43 bool FromValue(const base::Value* value, | 43 bool FromValue(const base::Value* value, |
| 44 std::string* /*error*/, | 44 std::string* /*error*/, |
| 45 std::vector<std::string>* /*unhandled_permissions*/) override { | 45 std::vector<std::string>* /*unhandled_permissions*/) override { |
| 46 return (value == NULL); | 46 return (value == NULL); |
| 47 } | 47 } |
| 48 | 48 |
| 49 scoped_ptr<base::Value> ToValue() const override { | 49 std::unique_ptr<base::Value> ToValue() const override { |
| 50 return scoped_ptr<base::Value>(); | 50 return std::unique_ptr<base::Value>(); |
| 51 } | 51 } |
| 52 | 52 |
| 53 APIPermission* Clone() const override { | 53 APIPermission* Clone() const override { |
| 54 return new SimpleAPIPermission(info()); | 54 return new SimpleAPIPermission(info()); |
| 55 } | 55 } |
| 56 | 56 |
| 57 APIPermission* Diff(const APIPermission* rhs) const override { | 57 APIPermission* Diff(const APIPermission* rhs) const override { |
| 58 CHECK_EQ(info(), rhs->info()); | 58 CHECK_EQ(info(), rhs->info()); |
| 59 return NULL; | 59 return NULL; |
| 60 } | 60 } |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 } | 109 } |
| 110 | 110 |
| 111 APIPermissionInfo::~APIPermissionInfo() { } | 111 APIPermissionInfo::~APIPermissionInfo() { } |
| 112 | 112 |
| 113 APIPermission* APIPermissionInfo::CreateAPIPermission() const { | 113 APIPermission* APIPermissionInfo::CreateAPIPermission() const { |
| 114 return api_permission_constructor_ ? | 114 return api_permission_constructor_ ? |
| 115 api_permission_constructor_(this) : new SimpleAPIPermission(this); | 115 api_permission_constructor_(this) : new SimpleAPIPermission(this); |
| 116 } | 116 } |
| 117 | 117 |
| 118 } // namespace extensions | 118 } // namespace extensions |
| OLD | NEW |