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

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

Issue 314113010: Remove deprecated permissions functions from Extension (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/extension_set.h » ('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 15 matching lines...) Expand all
26 : location(Manifest::INVALID_LOCATION), 26 : location(Manifest::INVALID_LOCATION),
27 creation_flags(Extension::NO_FLAGS) {} 27 creation_flags(Extension::NO_FLAGS) {}
28 28
29 ExtensionMsg_Loaded_Params::~ExtensionMsg_Loaded_Params() {} 29 ExtensionMsg_Loaded_Params::~ExtensionMsg_Loaded_Params() {}
30 30
31 ExtensionMsg_Loaded_Params::ExtensionMsg_Loaded_Params( 31 ExtensionMsg_Loaded_Params::ExtensionMsg_Loaded_Params(
32 const Extension* extension) 32 const Extension* extension)
33 : manifest(extension->manifest()->value()->DeepCopy()), 33 : manifest(extension->manifest()->value()->DeepCopy()),
34 location(extension->location()), 34 location(extension->location()),
35 path(extension->path()), 35 path(extension->path()),
36 apis(extension->GetActivePermissions()->apis()), 36 apis(extension->permissions_data()->active_permissions()->apis()),
37 manifest_permissions( 37 manifest_permissions(extension->permissions_data()
38 extension->GetActivePermissions()->manifest_permissions()), 38 ->active_permissions()
39 explicit_hosts(extension->GetActivePermissions()->explicit_hosts()), 39 ->manifest_permissions()),
40 scriptable_hosts(extension->GetActivePermissions()->scriptable_hosts()), 40 explicit_hosts(extension->permissions_data()
41 ->active_permissions()
42 ->explicit_hosts()),
43 scriptable_hosts(extension->permissions_data()
44 ->active_permissions()
45 ->scriptable_hosts()),
41 id(extension->id()), 46 id(extension->id()),
42 creation_flags(extension->creation_flags()) { 47 creation_flags(extension->creation_flags()) {
43 } 48 }
44 49
45 scoped_refptr<Extension> ExtensionMsg_Loaded_Params::ConvertToExtension( 50 scoped_refptr<Extension> ExtensionMsg_Loaded_Params::ConvertToExtension(
46 std::string* error) const { 51 std::string* error) const {
47 scoped_refptr<Extension> extension = 52 scoped_refptr<Extension> extension =
48 Extension::Create(path, location, *manifest, creation_flags, error); 53 Extension::Create(path, location, *manifest, creation_flags, error);
49 if (extension.get()) { 54 if (extension.get()) {
50 extension->permissions_data()->SetActivePermissions(new PermissionSet( 55 extension->permissions_data()->SetActivePermissions(new PermissionSet(
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 ReadParam(m, iter, &p->explicit_hosts) && 244 ReadParam(m, iter, &p->explicit_hosts) &&
240 ReadParam(m, iter, &p->scriptable_hosts); 245 ReadParam(m, iter, &p->scriptable_hosts);
241 } 246 }
242 247
243 void ParamTraits<ExtensionMsg_Loaded_Params>::Log(const param_type& p, 248 void ParamTraits<ExtensionMsg_Loaded_Params>::Log(const param_type& p,
244 std::string* l) { 249 std::string* l) {
245 l->append(p.id); 250 l->append(p.id);
246 } 251 }
247 252
248 } // namespace IPC 253 } // namespace IPC
OLDNEW
« no previous file with comments | « extensions/common/extension.cc ('k') | extensions/common/extension_set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698