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

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: Rebase 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
« no previous file with comments | « no previous file | chrome/browser/permissions/permission_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b46086668cbca15b654502966c8c0e3112684a5c..d7928e5d9b722bc6c79a1216a1de82a733665151 100644
--- a/chrome/browser/android/preferences/website_preference_bridge.cc
+++ b/chrome/browser/android/preferences/website_preference_bridge.cc
@@ -28,6 +28,7 @@
#include "chrome/browser/content_settings/tab_specific_content_settings.h"
#include "chrome/browser/content_settings/web_site_settings_uma_util.h"
#include "chrome/browser/notifications/desktop_notification_profile_util.h"
+#include "chrome/browser/permissions/permission_uma_util.h"
#include "chrome/browser/permissions/permission_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -155,9 +156,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::ScopedRevocationReporter scoped_revocation_reporter(
+ profile, origin_url, embedder_url, content_type,
+ PermissionSourceUI::SITE_SETTINGS);
+ 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698