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/renderer/dispatcher.h" | 5 #include "extensions/renderer/dispatcher.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/alias.h" | 9 #include "base/debug/alias.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
728 const URLPatternSet& explicit_hosts = params.explicit_hosts; | 728 const URLPatternSet& explicit_hosts = params.explicit_hosts; |
729 const URLPatternSet& scriptable_hosts = params.scriptable_hosts; | 729 const URLPatternSet& scriptable_hosts = params.scriptable_hosts; |
730 | 730 |
731 const Extension* extension = extensions_.GetByID(extension_id); | 731 const Extension* extension = extensions_.GetByID(extension_id); |
732 if (!extension) | 732 if (!extension) |
733 return; | 733 return; |
734 | 734 |
735 scoped_refptr<const PermissionSet> delta = new PermissionSet( | 735 scoped_refptr<const PermissionSet> delta = new PermissionSet( |
736 apis, manifest_permissions, explicit_hosts, scriptable_hosts); | 736 apis, manifest_permissions, explicit_hosts, scriptable_hosts); |
737 scoped_refptr<const PermissionSet> old_active = | 737 scoped_refptr<const PermissionSet> old_active = |
738 extension->GetActivePermissions(); | 738 extension->permissions_data()->active_permissions(); |
739 UpdatedExtensionPermissionsInfo::Reason reason = | 739 UpdatedExtensionPermissionsInfo::Reason reason = |
740 static_cast<UpdatedExtensionPermissionsInfo::Reason>(reason_id); | 740 static_cast<UpdatedExtensionPermissionsInfo::Reason>(reason_id); |
741 | 741 |
742 const PermissionSet* new_active = NULL; | 742 const PermissionSet* new_active = NULL; |
743 switch (reason) { | 743 switch (reason) { |
744 case UpdatedExtensionPermissionsInfo::ADDED: | 744 case UpdatedExtensionPermissionsInfo::ADDED: |
745 new_active = PermissionSet::CreateUnion(old_active.get(), delta.get()); | 745 new_active = PermissionSet::CreateUnion(old_active.get(), delta.get()); |
746 break; | 746 break; |
747 case UpdatedExtensionPermissionsInfo::REMOVED: | 747 case UpdatedExtensionPermissionsInfo::REMOVED: |
748 new_active = | 748 new_active = |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1233 return v8::Handle<v8::Object>(); | 1233 return v8::Handle<v8::Object>(); |
1234 | 1234 |
1235 if (bind_name) | 1235 if (bind_name) |
1236 *bind_name = split.back(); | 1236 *bind_name = split.back(); |
1237 | 1237 |
1238 return bind_object.IsEmpty() ? AsObjectOrEmpty(GetOrCreateChrome(context)) | 1238 return bind_object.IsEmpty() ? AsObjectOrEmpty(GetOrCreateChrome(context)) |
1239 : bind_object; | 1239 : bind_object; |
1240 } | 1240 } |
1241 | 1241 |
1242 } // namespace extensions | 1242 } // namespace extensions |
OLD | NEW |