| 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/extension_messages.h" | 5 #include "extensions/common/extension_messages.h" |
| 6 | 6 |
| 7 #include "content/public/common/common_param_traits.h" | 7 #include "content/public/common/common_param_traits.h" |
| 8 #include "extensions/common/extension.h" | 8 #include "extensions/common/extension.h" |
| 9 #include "extensions/common/manifest.h" | 9 #include "extensions/common/manifest.h" |
| 10 #include "extensions/common/manifest_handler.h" | 10 #include "extensions/common/manifest_handler.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 bool include_tab_permissions) | 53 bool include_tab_permissions) |
| 54 : manifest(extension->manifest()->value()->DeepCopy()), | 54 : manifest(extension->manifest()->value()->DeepCopy()), |
| 55 location(extension->location()), | 55 location(extension->location()), |
| 56 path(extension->path()), | 56 path(extension->path()), |
| 57 active_permissions(*extension->permissions_data()->active_permissions()), | 57 active_permissions(*extension->permissions_data()->active_permissions()), |
| 58 withheld_permissions( | 58 withheld_permissions( |
| 59 *extension->permissions_data()->withheld_permissions()), | 59 *extension->permissions_data()->withheld_permissions()), |
| 60 id(extension->id()), | 60 id(extension->id()), |
| 61 creation_flags(extension->creation_flags()) { | 61 creation_flags(extension->creation_flags()) { |
| 62 if (include_tab_permissions) { | 62 if (include_tab_permissions) { |
| 63 const extensions::PermissionsData::TabPermissionsMap& tab_permissions = | 63 extensions::PermissionsData::TabPermissionsMap tab_permissions = |
| 64 extension->permissions_data()->tab_specific_permissions(); | 64 extension->permissions_data()->CopyTabSpecificPermissionsMap(); |
| 65 for (const auto& pair : tab_permissions) { | 65 for (const auto& pair : tab_permissions) { |
| 66 tab_specific_permissions[pair.first] = | 66 tab_specific_permissions[pair.first] = |
| 67 ExtensionMsg_PermissionSetStruct(*pair.second); | 67 ExtensionMsg_PermissionSetStruct(*pair.second); |
| 68 } | 68 } |
| 69 } | 69 } |
| 70 } | 70 } |
| 71 | 71 |
| 72 scoped_refptr<Extension> ExtensionMsg_Loaded_Params::ConvertToExtension( | 72 scoped_refptr<Extension> ExtensionMsg_Loaded_Params::ConvertToExtension( |
| 73 std::string* error) const { | 73 std::string* error) const { |
| 74 scoped_refptr<Extension> extension = | 74 scoped_refptr<Extension> extension = |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 ReadParam(m, iter, &p->active_permissions) && | 318 ReadParam(m, iter, &p->active_permissions) && |
| 319 ReadParam(m, iter, &p->withheld_permissions); | 319 ReadParam(m, iter, &p->withheld_permissions); |
| 320 } | 320 } |
| 321 | 321 |
| 322 void ParamTraits<ExtensionMsg_Loaded_Params>::Log(const param_type& p, | 322 void ParamTraits<ExtensionMsg_Loaded_Params>::Log(const param_type& p, |
| 323 std::string* l) { | 323 std::string* l) { |
| 324 l->append(p.id); | 324 l->append(p.id); |
| 325 } | 325 } |
| 326 | 326 |
| 327 } // namespace IPC | 327 } // namespace IPC |
| OLD | NEW |