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

Unified Diff: chrome/browser/permissions/permission_context_base_unittest.cc

Issue 2226633002: Add a feature to display a persistence toggle for permission prompts on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nits, verbal change to make it geolocation-only Created 4 years, 4 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/permissions/permission_context_base_unittest.cc
diff --git a/chrome/browser/permissions/permission_context_base_unittest.cc b/chrome/browser/permissions/permission_context_base_unittest.cc
index 2225cadd21bd642e3f008af3a87dc65fa3a92dfd..d446c10f307023c86741e84be3ae0859c4883012 100644
--- a/chrome/browser/permissions/permission_context_base_unittest.cc
+++ b/chrome/browser/permissions/permission_context_base_unittest.cc
@@ -134,10 +134,14 @@ class PermissionContextBaseTests : public ChromeRenderViewHostTestHarness {
response == CONTENT_SETTING_ASK);
#if defined(OS_ANDROID)
bool update_content_setting = response != CONTENT_SETTING_ASK;
- bool allowed = response == CONTENT_SETTING_ALLOW;
+ PermissionAction decision = DISMISSED;
+ if (response == CONTENT_SETTING_ALLOW)
+ decision = GRANTED;
+ else if (response == CONTENT_SETTING_BLOCK)
+ decision = DENIED;
context->GetInfoBarController()->OnPermissionSet(
id, url, url, false /* user_gesture */, update_content_setting,
- allowed);
+ decision);
#else
PermissionRequestManager* manager =
PermissionRequestManager::FromWebContents(web_contents());

Powered by Google App Engine
This is Rietveld 408576698