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

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

Issue 1803973002: Content Settings: Add RevocationObserver to measure when permissions are revoked (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update rappor.xml Created 4 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
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 8a0625f46abcc0068719f21cb65ec6a5dc79fe7c..c9d2487ec68137f7e9106ade7b263d449ac24fb1 100644
--- a/chrome/browser/android/preferences/website_preference_bridge.cc
+++ b/chrome/browser/android/preferences/website_preference_bridge.cc
@@ -19,6 +19,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_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/storage/storage_info_fetcher.h"
@@ -136,9 +137,9 @@ void SetSettingForOrigin(JNIEnv* env,
jboolean is_incognito) {
GURL origin_url(ConvertJavaStringToUTF8(env, origin));
GURL embedder_url(ConvertJavaStringToUTF8(env, embedder));
- GetHostContentSettingsMap(is_incognito)
- ->SetContentSettingDefaultScope(origin_url, embedder_url, content_type,
- std::string(), setting);
+ PermissionUtil::SetContentSettingAndRecordRevocation(
+ GetActiveUserProfile(is_incognito), 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_uma_util.h » ('j') | chrome/browser/permissions/permission_util.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698