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.h" | 5 #include "chrome/common/extensions/extension.h" |
6 | 6 |
7 #include <ostream> | 7 #include <ostream> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 3473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3484 } | 3484 } |
3485 | 3485 |
3486 const URLPatternSet& Extension::GetEffectiveHostPermissions() const { | 3486 const URLPatternSet& Extension::GetEffectiveHostPermissions() const { |
3487 base::AutoLock auto_lock(runtime_data_lock_); | 3487 base::AutoLock auto_lock(runtime_data_lock_); |
3488 return runtime_data_.GetActivePermissions()->effective_hosts(); | 3488 return runtime_data_.GetActivePermissions()->effective_hosts(); |
3489 } | 3489 } |
3490 | 3490 |
3491 bool Extension::HasHostPermission(const GURL& url) const { | 3491 bool Extension::HasHostPermission(const GURL& url) const { |
3492 if (url.SchemeIs(chrome::kChromeUIScheme) && | 3492 if (url.SchemeIs(chrome::kChromeUIScheme) && |
3493 url.host() != chrome::kChromeUIFaviconHost && | 3493 url.host() != chrome::kChromeUIFaviconHost && |
3494 url.host() != chrome::kChromeUIThemeHost && | |
asargent_no_longer_on_chrome
2012/09/14 22:01:01
Are you sure you want to let non-component extensi
zel
2012/09/14 22:29:25
No, we don't, I misinterpreted this if statement.
benrg
2012/09/14 22:38:16
Done.
| |
3494 url.host() != chrome::kChromeUIThumbnailHost && | 3495 url.host() != chrome::kChromeUIThumbnailHost && |
3495 location() != Extension::COMPONENT) { | 3496 location() != Extension::COMPONENT) { |
3496 return false; | 3497 return false; |
3497 } | 3498 } |
3498 | 3499 |
3499 base::AutoLock auto_lock(runtime_data_lock_); | 3500 base::AutoLock auto_lock(runtime_data_lock_); |
3500 return runtime_data_.GetActivePermissions()-> | 3501 return runtime_data_.GetActivePermissions()-> |
3501 HasExplicitAccessToOrigin(url); | 3502 HasExplicitAccessToOrigin(url); |
3502 } | 3503 } |
3503 | 3504 |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3962 | 3963 |
3963 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( | 3964 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( |
3964 const Extension* extension, | 3965 const Extension* extension, |
3965 const PermissionSet* permissions, | 3966 const PermissionSet* permissions, |
3966 Reason reason) | 3967 Reason reason) |
3967 : reason(reason), | 3968 : reason(reason), |
3968 extension(extension), | 3969 extension(extension), |
3969 permissions(permissions) {} | 3970 permissions(permissions) {} |
3970 | 3971 |
3971 } // namespace extensions | 3972 } // namespace extensions |
OLD | NEW |