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

Unified Diff: chrome/browser/android/preferences/website_preference_bridge.cc

Issue 2165733003: Add revocation reporter to permission util (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add-source-ui-to-permission-report
Patch Set: merge Created 4 years, 5 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/android/preferences/website_preference_bridge.cc
diff --git a/chrome/browser/android/preferences/website_preference_bridge.cc b/chrome/browser/android/preferences/website_preference_bridge.cc
index fd92c2d163ac490a43c5c87a76a06a3a8cb52921..5a3a06ae5af6c16085e72c0524f04fa7cea1310d 100644
--- a/chrome/browser/android/preferences/website_preference_bridge.cc
+++ b/chrome/browser/android/preferences/website_preference_bridge.cc
@@ -151,9 +151,13 @@ void SetSettingForOrigin(JNIEnv* env,
GURL origin_url(ConvertJavaStringToUTF8(env, origin));
GURL embedder_url =
embedder ? GURL(ConvertJavaStringToUTF8(env, embedder)) : GURL();
- PermissionUtil::SetContentSettingAndRecordRevocation(
- GetActiveUserProfile(is_incognito), origin_url, embedder_url,
- content_type, std::string(), setting);
+ Profile* profile = GetActiveUserProfile(is_incognito);
+ PermissionUtil::RevocationReporter scoped_revocation_reporter(
+ profile, origin_url, embedder_url, content_type, std::string(),
+ PermissionSourceUI::SITE_SETTING);
+ HostContentSettingsMapFactory::GetForProfile(profile)
+ ->SetContentSettingDefaultScope(origin_url, embedder_url, content_type,
+ std::string(), setting);
WebSiteSettingsUmaUtil::LogPermissionChange(content_type, setting);
}
« no previous file with comments | « no previous file | chrome/browser/permissions/permission_util.h » ('j') | chrome/browser/permissions/permission_util.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698