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

Unified Diff: chrome/browser/extensions/extension_special_storage_policy.cc

Issue 10675007: Move each permission classes to its own files in extensions/permissions (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase again Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_special_storage_policy.cc
diff --git a/chrome/browser/extensions/extension_special_storage_policy.cc b/chrome/browser/extensions/extension_special_storage_policy.cc
index 1fa3a020243cf9373c2cce81bd5ec7bb5b8b1faa..8d85eea19ee4c02e7f30fc76e32168f7eb63e14c 100644
--- a/chrome/browser/extensions/extension_special_storage_policy.cc
+++ b/chrome/browser/extensions/extension_special_storage_policy.cc
@@ -14,6 +14,7 @@
#include "content/public/browser/browser_thread.h"
using content::BrowserThread;
+using extensions::APIPermission;
ExtensionSpecialStoragePolicy::ExtensionSpecialStoragePolicy(
CookieSettings* cookie_settings)
@@ -70,19 +71,19 @@ void ExtensionSpecialStoragePolicy::GrantRightsForExtension(
DCHECK(extension);
if (!extension->is_hosted_app() &&
!extension->HasAPIPermission(
- ExtensionAPIPermission::kUnlimitedStorage) &&
+ APIPermission::kUnlimitedStorage) &&
!extension->HasAPIPermission(
- ExtensionAPIPermission::kFileBrowserHandler)) {
+ APIPermission::kFileBrowserHandler)) {
return;
}
{
base::AutoLock locker(lock_);
if (NeedsProtection(extension))
protected_apps_.Add(extension);
- if (extension->HasAPIPermission(ExtensionAPIPermission::kUnlimitedStorage))
+ if (extension->HasAPIPermission(APIPermission::kUnlimitedStorage))
unlimited_extensions_.Add(extension);
if (extension->HasAPIPermission(
- ExtensionAPIPermission::kFileBrowserHandler)) {
+ APIPermission::kFileBrowserHandler)) {
file_handler_extensions_.Add(extension);
}
}
@@ -94,19 +95,19 @@ void ExtensionSpecialStoragePolicy::RevokeRightsForExtension(
DCHECK(extension);
if (!extension->is_hosted_app() &&
!extension->HasAPIPermission(
- ExtensionAPIPermission::kUnlimitedStorage) &&
+ APIPermission::kUnlimitedStorage) &&
!extension->HasAPIPermission(
- ExtensionAPIPermission::kFileBrowserHandler)) {
+ APIPermission::kFileBrowserHandler)) {
return;
}
{
base::AutoLock locker(lock_);
if (extension->is_hosted_app() && !extension->from_bookmark())
protected_apps_.Remove(extension);
- if (extension->HasAPIPermission(ExtensionAPIPermission::kUnlimitedStorage))
+ if (extension->HasAPIPermission(APIPermission::kUnlimitedStorage))
unlimited_extensions_.Remove(extension);
if (extension->HasAPIPermission(
- ExtensionAPIPermission::kFileBrowserHandler)) {
+ APIPermission::kFileBrowserHandler)) {
file_handler_extensions_.Remove(extension);
}
}
« no previous file with comments | « chrome/browser/extensions/extension_service_unittest.cc ('k') | chrome/browser/extensions/extension_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698