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

Unified Diff: chrome/browser/content_settings/content_settings_utils.cc

Issue 356543003: Audit the last usage of Geolocation and Notification permissions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add auditing for actual usage, too. Created 6 years, 6 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/content_settings/content_settings_utils.cc
diff --git a/chrome/browser/content_settings/content_settings_utils.cc b/chrome/browser/content_settings/content_settings_utils.cc
index 27977f26bbff7f20a7a129f947970a54fb083dab..0fd27413406385cd571927fa550c78e62173292c 100644
--- a/chrome/browser/content_settings/content_settings_utils.cc
+++ b/chrome/browser/content_settings/content_settings_utils.cc
@@ -64,6 +64,15 @@ std::string GetTypeName(ContentSettingsType type) {
return std::string(kTypeNames[type]);
}
+ContentSettingsType GetTypeFromName(const std::string& name) {
+ for (size_t type = 0; type < CONTENT_SETTINGS_NUM_TYPES; ++type) {
+ if (name == std::string(GetTypeName(ContentSettingsType(type)))) {
+ return ContentSettingsType(type);
+ }
+ }
+ return CONTENT_SETTINGS_TYPE_DEFAULT;
+}
+
std::string CreatePatternString(
const ContentSettingsPattern& item_pattern,
const ContentSettingsPattern& top_level_frame_pattern) {

Powered by Google App Engine
This is Rietveld 408576698