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

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: Rewrite patch in permissions layer 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 d7fb84f7812080235a167b96798c50e7778a7d13..aef6327c521ce455ab0ee77603c2f4944a9fe85d 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::SetContentSettingRecordRevocation(
+ 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_util.h » ('j') | chrome/browser/permissions/permission_util.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698