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/extension_messages.h" | 5 #include "chrome/common/extensions/extension_messages.h" |
6 | 6 |
7 #include "chrome/common/extensions/extension.h" | 7 #include "chrome/common/extensions/extension.h" |
8 #include "chrome/common/extensions/extension_constants.h" | 8 #include "chrome/common/extensions/extension_constants.h" |
9 #include "chrome/common/extensions/manifest.h" | 9 #include "chrome/common/extensions/manifest.h" |
10 #include "content/public/common/common_param_traits.h" | 10 #include "content/public/common/common_param_traits.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 scoped_refptr<Extension> extension( | 36 scoped_refptr<Extension> extension( |
37 Extension::Create(path, location, *manifest, creation_flags, | 37 Extension::Create(path, location, *manifest, creation_flags, |
38 &error)); | 38 &error)); |
39 if (!extension.get()) { | 39 if (!extension.get()) { |
40 DLOG(ERROR) << "Error deserializing extension: " << error; | 40 DLOG(ERROR) << "Error deserializing extension: " << error; |
41 return extension; | 41 return extension; |
42 } | 42 } |
43 | 43 |
44 extension->SetActivePermissions( | 44 extension->SetActivePermissions( |
45 new ExtensionPermissionSet(apis, explicit_hosts, scriptable_hosts)); | 45 new ExtensionPermissionSet(apis, explicit_hosts, scriptable_hosts)); |
| 46 |
46 return extension; | 47 return extension; |
47 } | 48 } |
48 | 49 |
49 namespace IPC { | 50 namespace IPC { |
50 | 51 |
51 template <> | 52 template <> |
52 struct ParamTraits<Extension::Location> { | 53 struct ParamTraits<Extension::Location> { |
53 typedef Extension::Location param_type; | 54 typedef Extension::Location param_type; |
54 static void Write(Message* m, const param_type& p) { | 55 static void Write(Message* m, const param_type& p) { |
55 int val = static_cast<int>(p); | 56 int val = static_cast<int>(p); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 ReadParam(m, iter, &p->explicit_hosts) && | 161 ReadParam(m, iter, &p->explicit_hosts) && |
161 ReadParam(m, iter, &p->scriptable_hosts); | 162 ReadParam(m, iter, &p->scriptable_hosts); |
162 } | 163 } |
163 | 164 |
164 void ParamTraits<ExtensionMsg_Loaded_Params>::Log(const param_type& p, | 165 void ParamTraits<ExtensionMsg_Loaded_Params>::Log(const param_type& p, |
165 std::string* l) { | 166 std::string* l) { |
166 l->append(p.id); | 167 l->append(p.id); |
167 } | 168 } |
168 | 169 |
169 } // namespace IPC | 170 } // namespace IPC |
OLD | NEW |