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

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: Rebase Created 4 years, 8 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_uma_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 b4c829189f5766440901bd70c54f85b1a9ee7e7a..bd3cda2a1800703140675910434387c88b40d2f6 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"
@@ -137,9 +138,9 @@ void SetSettingForOrigin(JNIEnv* env,
GURL origin_url(ConvertJavaStringToUTF8(env, origin));
GURL embedder_url =
embedder ? GURL(ConvertJavaStringToUTF8(env, embedder)) : GURL();
- 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698