| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/extension_messages.h" | 5 #include "chrome/common/extensions/extension_messages.h" |
| 6 | 6 |
| 7 #include "chrome/common/extensions/extension_constants.h" | 7 #include "chrome/common/extensions/extension_constants.h" |
| 8 #include "content/public/common/common_param_traits.h" | 8 #include "content/public/common/common_param_traits.h" |
| 9 | 9 |
| 10 ExtensionMsg_Loaded_Params::ExtensionMsg_Loaded_Params() | 10 ExtensionMsg_Loaded_Params::ExtensionMsg_Loaded_Params() |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 } | 57 } |
| 58 | 58 |
| 59 scoped_refptr<Extension> | 59 scoped_refptr<Extension> |
| 60 ExtensionMsg_Loaded_Params::ConvertToExtension() const { | 60 ExtensionMsg_Loaded_Params::ConvertToExtension() const { |
| 61 std::string error; | 61 std::string error; |
| 62 | 62 |
| 63 scoped_refptr<Extension> extension( | 63 scoped_refptr<Extension> extension( |
| 64 Extension::Create(path, location, *manifest, creation_flags, | 64 Extension::Create(path, location, *manifest, creation_flags, |
| 65 &error)); | 65 &error)); |
| 66 if (!extension.get()) | 66 if (!extension.get()) |
| 67 LOG(ERROR) << "Error deserializing extension: " << error; | 67 DLOG(ERROR) << "Error deserializing extension: " << error; |
| 68 else | 68 else |
| 69 extension->SetActivePermissions( | 69 extension->SetActivePermissions( |
| 70 new ExtensionPermissionSet(apis, explicit_hosts, scriptable_hosts)); | 70 new ExtensionPermissionSet(apis, explicit_hosts, scriptable_hosts)); |
| 71 | 71 |
| 72 return extension; | 72 return extension; |
| 73 } | 73 } |
| 74 | 74 |
| 75 namespace IPC { | 75 namespace IPC { |
| 76 | 76 |
| 77 template <> | 77 template <> |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 ReadParam(m, iter, &p->explicit_hosts) && | 186 ReadParam(m, iter, &p->explicit_hosts) && |
| 187 ReadParam(m, iter, &p->scriptable_hosts); | 187 ReadParam(m, iter, &p->scriptable_hosts); |
| 188 } | 188 } |
| 189 | 189 |
| 190 void ParamTraits<ExtensionMsg_Loaded_Params>::Log(const param_type& p, | 190 void ParamTraits<ExtensionMsg_Loaded_Params>::Log(const param_type& p, |
| 191 std::string* l) { | 191 std::string* l) { |
| 192 l->append(p.id); | 192 l->append(p.id); |
| 193 } | 193 } |
| 194 | 194 |
| 195 } // namespace IPC | 195 } // namespace IPC |
| OLD | NEW |