Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Side by Side Diff: extensions/common/extension_messages.cc

Issue 315573003: Remove PermissionsData::ForExtension() completely (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « extensions/common/extension.cc ('k') | extensions/common/features/permission_feature.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 29 matching lines...) Expand all
40 scriptable_hosts(extension->GetActivePermissions()->scriptable_hosts()), 40 scriptable_hosts(extension->GetActivePermissions()->scriptable_hosts()),
41 id(extension->id()), 41 id(extension->id()),
42 creation_flags(extension->creation_flags()) { 42 creation_flags(extension->creation_flags()) {
43 } 43 }
44 44
45 scoped_refptr<Extension> ExtensionMsg_Loaded_Params::ConvertToExtension( 45 scoped_refptr<Extension> ExtensionMsg_Loaded_Params::ConvertToExtension(
46 std::string* error) const { 46 std::string* error) const {
47 scoped_refptr<Extension> extension = 47 scoped_refptr<Extension> extension =
48 Extension::Create(path, location, *manifest, creation_flags, error); 48 Extension::Create(path, location, *manifest, creation_flags, error);
49 if (extension.get()) { 49 if (extension.get()) {
50 extensions::PermissionsData::ForExtension(extension) 50 extension->permissions_data()->SetActivePermissions(new PermissionSet(
51 ->SetActivePermissions(new PermissionSet( 51 apis, manifest_permissions, explicit_hosts, scriptable_hosts));
52 apis, manifest_permissions, explicit_hosts, scriptable_hosts));
53 } 52 }
54 return extension; 53 return extension;
55 } 54 }
56 55
57 namespace IPC { 56 namespace IPC {
58 57
59 template <> 58 template <>
60 struct ParamTraits<Manifest::Location> { 59 struct ParamTraits<Manifest::Location> {
61 typedef Manifest::Location param_type; 60 typedef Manifest::Location param_type;
62 static void Write(Message* m, const param_type& p) { 61 static void Write(Message* m, const param_type& p) {
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 ReadParam(m, iter, &p->explicit_hosts) && 239 ReadParam(m, iter, &p->explicit_hosts) &&
241 ReadParam(m, iter, &p->scriptable_hosts); 240 ReadParam(m, iter, &p->scriptable_hosts);
242 } 241 }
243 242
244 void ParamTraits<ExtensionMsg_Loaded_Params>::Log(const param_type& p, 243 void ParamTraits<ExtensionMsg_Loaded_Params>::Log(const param_type& p,
245 std::string* l) { 244 std::string* l) {
246 l->append(p.id); 245 l->append(p.id);
247 } 246 }
248 247
249 } // namespace IPC 248 } // namespace IPC
OLDNEW
« no previous file with comments | « extensions/common/extension.cc ('k') | extensions/common/features/permission_feature.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698