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 3476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3487 } | 3487 } |
3488 | 3488 |
3489 const URLPatternSet& Extension::GetEffectiveHostPermissions() const { | 3489 const URLPatternSet& Extension::GetEffectiveHostPermissions() const { |
3490 base::AutoLock auto_lock(runtime_data_lock_); | 3490 base::AutoLock auto_lock(runtime_data_lock_); |
3491 return runtime_data_.GetActivePermissions()->effective_hosts(); | 3491 return runtime_data_.GetActivePermissions()->effective_hosts(); |
3492 } | 3492 } |
3493 | 3493 |
3494 bool Extension::HasHostPermission(const GURL& url) const { | 3494 bool Extension::HasHostPermission(const GURL& url) const { |
3495 if (url.SchemeIs(chrome::kChromeUIScheme) && | 3495 if (url.SchemeIs(chrome::kChromeUIScheme) && |
3496 url.host() != chrome::kChromeUIFaviconHost && | 3496 url.host() != chrome::kChromeUIFaviconHost && |
| 3497 url.host() != chrome::kChromeUIThemeHost && |
3497 url.host() != chrome::kChromeUIThumbnailHost && | 3498 url.host() != chrome::kChromeUIThumbnailHost && |
3498 location() != Extension::COMPONENT) { | 3499 location() != Extension::COMPONENT) { |
3499 return false; | 3500 return false; |
3500 } | 3501 } |
3501 | 3502 |
3502 base::AutoLock auto_lock(runtime_data_lock_); | 3503 base::AutoLock auto_lock(runtime_data_lock_); |
3503 return runtime_data_.GetActivePermissions()-> | 3504 return runtime_data_.GetActivePermissions()-> |
3504 HasExplicitAccessToOrigin(url); | 3505 HasExplicitAccessToOrigin(url); |
3505 } | 3506 } |
3506 | 3507 |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3965 | 3966 |
3966 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( | 3967 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( |
3967 const Extension* extension, | 3968 const Extension* extension, |
3968 const PermissionSet* permissions, | 3969 const PermissionSet* permissions, |
3969 Reason reason) | 3970 Reason reason) |
3970 : reason(reason), | 3971 : reason(reason), |
3971 extension(extension), | 3972 extension(extension), |
3972 permissions(permissions) {} | 3973 permissions(permissions) {} |
3973 | 3974 |
3974 } // namespace extensions | 3975 } // namespace extensions |
OLD | NEW |