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

Side by Side Diff: extensions/renderer/extension_injection_host.cc

Issue 1349613003: [Extensions] Un-refcount PermissionSet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/extension_injection_host.h" 5 #include "extensions/renderer/extension_injection_host.h"
6 6
7 #include "content/public/renderer/render_frame.h" 7 #include "content/public/renderer/render_frame.h"
8 #include "extensions/common/constants.h" 8 #include "extensions/common/constants.h"
9 #include "extensions/common/manifest_handlers/csp_info.h" 9 #include "extensions/common/manifest_handlers/csp_info.h"
10 #include "extensions/renderer/renderer_extension_registry.h" 10 #include "extensions/renderer/renderer_extension_registry.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 } 86 }
87 return access; 87 return access;
88 } 88 }
89 89
90 bool ExtensionInjectionHost::ShouldNotifyBrowserOfInjection() const { 90 bool ExtensionInjectionHost::ShouldNotifyBrowserOfInjection() const {
91 // We notify the browser of any injection if the extension has no withheld 91 // We notify the browser of any injection if the extension has no withheld
92 // permissions (i.e., the permissions weren't restricted), but would have 92 // permissions (i.e., the permissions weren't restricted), but would have
93 // otherwise been affected by the scripts-require-action feature. 93 // otherwise been affected by the scripts-require-action feature.
94 return extension_->permissions_data()->withheld_permissions()->IsEmpty() && 94 return extension_->permissions_data()->withheld_permissions()->IsEmpty() &&
95 PermissionsData::ScriptsMayRequireActionForExtension( 95 PermissionsData::ScriptsMayRequireActionForExtension(
96 extension_, 96 extension_, extension_->permissions_data()->active_permissions());
97 extension_->permissions_data()->active_permissions().get());
98 } 97 }
99 98
100 } // namespace extensions 99 } // namespace extensions
OLDNEW
« extensions/common/permissions/permissions_data.cc ('K') | « extensions/renderer/dispatcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698