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

Unified Diff: android_webview/browser/aw_content_browser_client.cc

Issue 1020683003: Make content::PermissionType an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android compile Created 5 years, 9 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 | « no previous file | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/aw_content_browser_client.cc
diff --git a/android_webview/browser/aw_content_browser_client.cc b/android_webview/browser/aw_content_browser_client.cc
index fd82607b0c1ee7ef681ea498ec577a9b7632762c..f4c0b6363a1ed15281bc3803576b62e967c27b16 100644
--- a/android_webview/browser/aw_content_browser_client.cc
+++ b/android_webview/browser/aw_content_browser_client.cc
@@ -392,7 +392,7 @@ void AwContentBrowserClient::RequestPermission(
AwBrowserPermissionRequestDelegate::FromID(render_process_id,
render_view_id);
switch (permission) {
- case content::PERMISSION_GEOLOCATION:
+ case content::PermissionType::GEOLOCATION:
if (!delegate) {
DVLOG(0) << "Dropping GeolocationPermission request";
callback.Run(content::PERMISSION_STATUS_DENIED);
@@ -401,7 +401,7 @@ void AwContentBrowserClient::RequestPermission(
delegate->RequestGeolocationPermission(
origin, base::Bind(&CallbackPermisisonStatusWrapper, callback));
break;
- case content::PERMISSION_PROTECTED_MEDIA_IDENTIFIER:
+ case content::PermissionType::PROTECTED_MEDIA_IDENTIFIER:
if (!delegate) {
DVLOG(0) << "Dropping ProtectedMediaIdentifierPermission request";
callback.Run(content::PERMISSION_STATUS_DENIED);
@@ -410,14 +410,15 @@ void AwContentBrowserClient::RequestPermission(
delegate->RequestProtectedMediaIdentifierPermission(
origin, base::Bind(&CallbackPermisisonStatusWrapper, callback));
break;
- case content::PERMISSION_MIDI_SYSEX:
- case content::PERMISSION_NOTIFICATIONS:
- case content::PERMISSION_PUSH_MESSAGING:
+ case content::PermissionType::MIDI_SYSEX:
+ case content::PermissionType::NOTIFICATIONS:
+ case content::PermissionType::PUSH_MESSAGING:
NOTIMPLEMENTED() << "RequestPermission not implemented for "
- << permission;
+ << static_cast<int>(permission);
break;
- case content::PERMISSION_NUM:
- NOTREACHED() << "Invalid RequestPermission for " << permission;
+ case content::PermissionType::NUM:
+ NOTREACHED() << "Invalid RequestPermission for "
+ << static_cast<int>(permission);
break;
}
}
@@ -435,19 +436,21 @@ void AwContentBrowserClient::CancelPermissionRequest(
if (!delegate)
return;
switch (permission) {
- case content::PERMISSION_GEOLOCATION:
+ case content::PermissionType::GEOLOCATION:
delegate->CancelGeolocationPermissionRequests(origin);
break;
- case content::PERMISSION_PROTECTED_MEDIA_IDENTIFIER:
+ case content::PermissionType::PROTECTED_MEDIA_IDENTIFIER:
delegate->CancelProtectedMediaIdentifierPermissionRequests(origin);
break;
- case content::PERMISSION_MIDI_SYSEX:
- case content::PERMISSION_NOTIFICATIONS:
- case content::PERMISSION_PUSH_MESSAGING:
- NOTIMPLEMENTED() << "CancelPermission not implemented for " << permission;
+ case content::PermissionType::MIDI_SYSEX:
+ case content::PermissionType::NOTIFICATIONS:
+ case content::PermissionType::PUSH_MESSAGING:
+ NOTIMPLEMENTED() << "CancelPermission not implemented for "
+ << static_cast<int>(permission);
break;
- case content::PERMISSION_NUM:
- NOTREACHED() << "Invalid CancelPermission for " << permission;
+ case content::PermissionType::NUM:
+ NOTREACHED() << "Invalid CancelPermission for "
+ << static_cast<int>(permission);
break;
}
}
« no previous file with comments | « no previous file | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698