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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 10649003: 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 on HEAD 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
« no previous file with comments | « chrome/browser/background/background_mode_manager.cc ('k') | chrome/browser/debugger/devtools_window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index f3b9c54c3f5a6e47f4b99550d83867266964cb11..ed0bf65d5edd9e68a1640c95c66b1e7a6c568f6f 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -135,6 +135,7 @@ using content::QuotaPermissionContext;
using content::RenderViewHost;
using content::SiteInstance;
using content::WebContents;
+using extensions::APIPermission;
using extensions::Extension;
using webkit_glue::WebPreferences;
@@ -509,7 +510,7 @@ bool ChromeContentBrowserClient::ShouldUseProcessPerSite(
// page, we want to give each instance its own process to improve
// responsiveness.
if (extension->GetType() == Extension::TYPE_HOSTED_APP) {
- if (!extension->HasAPIPermission(ExtensionAPIPermission::kBackground) ||
+ if (!extension->HasAPIPermission(APIPermission::kBackground) ||
!extension->allow_background_js_access()) {
return false;
}
@@ -1171,7 +1172,7 @@ void ChromeContentBrowserClient::RequestDesktopNotificationPermission(
service->extensions()->GetExtensionOrAppByURL(ExtensionURLInfo(
source_origin));
if (extension &&
- extension->HasAPIPermission(ExtensionAPIPermission::kNotification)) {
+ extension->HasAPIPermission(APIPermission::kNotification)) {
RenderViewHost* rvh =
RenderViewHost::FromID(render_process_id, render_view_id);
if (rvh)
@@ -1198,7 +1199,7 @@ WebKit::WebNotificationPresenter::Permission
ProfileIOData* io_data = ProfileIOData::FromResourceContext(context);
if (io_data->GetExtensionInfoMap()->SecurityOriginHasAPIPermission(
source_origin, render_process_id,
- ExtensionAPIPermission::kNotification))
+ APIPermission::kNotification))
return WebKit::WebNotificationPresenter::PermissionAllowed;
// Fall back to the regular notification preferences, which works on an
@@ -1280,7 +1281,7 @@ bool ChromeContentBrowserClient::CanCreateWindow(
if (!map->SecurityOriginHasAPIPermission(
source_origin,
render_process_id,
- ExtensionAPIPermission::kBackground)) {
+ APIPermission::kBackground)) {
return false;
}
@@ -1589,7 +1590,7 @@ bool ChromeContentBrowserClient::AllowPepperSocketAPI(
if (!extension)
return false;
- if (extension->HasAPIPermission(ExtensionAPIPermission::kSocket))
+ if (extension->HasAPIPermission(APIPermission::kSocket))
return true;
return false;
« no previous file with comments | « chrome/browser/background/background_mode_manager.cc ('k') | chrome/browser/debugger/devtools_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698