Commit 14eb3501 authored by dhnishi's avatar dhnishi Committed by Commit bot

Remove Google Talk plugin whitelisting now that b/11355273 is fixed.

BUG=115472

Review URL: https://codereview.chromium.org/551093003

Cr-Commit-Position: refs/heads/master@{#293959}
parent 583f99ae
......@@ -152,10 +152,6 @@ void HostContentSettingsMap::RegisterProfilePrefs(
prefs::kContentSettingsWindowLastTabIndex,
0,
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
registry->RegisterIntegerPref(
prefs::kContentSettingsDefaultWhitelistVersion,
0,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
registry->RegisterBooleanPref(
prefs::kContentSettingsClearOnExitMigrated,
false,
......
......@@ -1236,34 +1236,6 @@ void ContentSettingsHandler::RegisterMessages() {
base::Unretained(this)));
}
void ContentSettingsHandler::ApplyWhitelist(ContentSettingsType content_type,
ContentSetting default_setting) {
HostContentSettingsMap* map = GetContentSettingsMap();
if (content_type != CONTENT_SETTINGS_TYPE_PLUGINS)
return;
const int kDefaultWhitelistVersion = 1;
PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui()));
int version = prefs->GetInteger(
prefs::kContentSettingsDefaultWhitelistVersion);
if (version >= kDefaultWhitelistVersion)
return;
ContentSetting old_setting =
map->GetDefaultContentSetting(CONTENT_SETTINGS_TYPE_PLUGINS, NULL);
// TODO(bauerb): Remove this once the Google Talk plug-in works nicely with
// click-to-play (b/6090625).
if (old_setting == CONTENT_SETTING_ALLOW &&
default_setting == CONTENT_SETTING_ASK) {
map->SetWebsiteSetting(
ContentSettingsPattern::Wildcard(),
ContentSettingsPattern::Wildcard(),
CONTENT_SETTINGS_TYPE_PLUGINS,
"google-talk",
new base::FundamentalValue(CONTENT_SETTING_ALLOW));
}
prefs->SetInteger(prefs::kContentSettingsDefaultWhitelistVersion,
kDefaultWhitelistVersion);
}
void ContentSettingsHandler::SetContentFilter(const base::ListValue* args) {
DCHECK_EQ(2U, args->GetSize());
std::string group, setting;
......@@ -1286,7 +1258,6 @@ void ContentSettingsHandler::SetContentFilter(const base::ListValue* args) {
HostContentSettingsMap* map = profile->GetHostContentSettingsMap();
ApplyWhitelist(content_type, default_setting);
map->SetDefaultContentSetting(content_type, default_setting);
switch (content_type) {
......
......@@ -1004,10 +1004,6 @@ const char kContentSettingsVersion[] = "profile.content_settings.pref_version";
const char kContentSettingsPatternPairs[] =
"profile.content_settings.pattern_pairs";
// Version of the content settings whitelist.
const char kContentSettingsDefaultWhitelistVersion[] =
"profile.content_settings.whitelist_version";
#if !defined(OS_ANDROID)
// Which plugins have been whitelisted manually by the user.
const char kContentSettingsPluginWhitelist[] =
......
......@@ -325,7 +325,6 @@ extern const char kDefaultContentSettings[];
extern const char kContentSettingsClearOnExitMigrated[];
extern const char kContentSettingsVersion[];
extern const char kContentSettingsPatternPairs[];
extern const char kContentSettingsDefaultWhitelistVersion[];
extern const char kContentSettingsPluginWhitelist[];
extern const char kBlockThirdPartyCookies[];
extern const char kClearSiteDataOnExit[];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment