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

Unified Diff: chrome/browser/ui/content_settings/content_setting_bubble_model.cc

Issue 19375002: Move GeolocationSettingsState to ContentSettingsUsagesState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review #9 Created 7 years, 5 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/ui/content_settings/content_setting_bubble_model.cc
diff --git a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
index 32f86d4d4b979463b6ca7e9a7b35299f2d00cc4c..7433ddf14ffb535b42a999947f0188745574b3d7 100644
--- a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
+++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
@@ -953,11 +953,11 @@ void ContentSettingDomainListBubbleModel::MaybeAddDomainList(
void ContentSettingDomainListBubbleModel::SetDomainsAndCustomLink() {
TabSpecificContentSettings* content_settings =
TabSpecificContentSettings::FromWebContents(web_contents());
- const GeolocationSettingsState& settings =
- content_settings->geolocation_settings_state();
- GeolocationSettingsState::FormattedHostsPerState formatted_hosts_per_state;
+ const ContentSettingsUsagesState& usages =
+ content_settings->geolocation_usages_state();
+ ContentSettingsUsagesState::FormattedHostsPerState formatted_hosts_per_state;
unsigned int tab_state_flags = 0;
- settings.GetDetailedInfo(&formatted_hosts_per_state, &tab_state_flags);
+ usages.GetDetailedInfo(&formatted_hosts_per_state, &tab_state_flags);
// Divide the tab's current geolocation users into sets according to their
// permission state.
MaybeAddDomainList(formatted_hosts_per_state[CONTENT_SETTING_ALLOW],
@@ -966,12 +966,12 @@ void ContentSettingDomainListBubbleModel::SetDomainsAndCustomLink() {
MaybeAddDomainList(formatted_hosts_per_state[CONTENT_SETTING_BLOCK],
IDS_GEOLOCATION_BUBBLE_SECTION_DENIED);
- if (tab_state_flags & GeolocationSettingsState::TABSTATE_HAS_EXCEPTION) {
+ if (tab_state_flags & ContentSettingsUsagesState::TABSTATE_HAS_EXCEPTION) {
set_custom_link(l10n_util::GetStringUTF8(
IDS_GEOLOCATION_BUBBLE_CLEAR_LINK));
set_custom_link_enabled(true);
} else if (tab_state_flags &
- GeolocationSettingsState::TABSTATE_HAS_CHANGED) {
+ ContentSettingsUsagesState::TABSTATE_HAS_CHANGED) {
set_custom_link(l10n_util::GetStringUTF8(
IDS_GEOLOCATION_BUBBLE_REQUIRE_RELOAD_TO_CLEAR));
}
@@ -985,12 +985,12 @@ void ContentSettingDomainListBubbleModel::OnCustomLinkClicked() {
const GURL& embedder_url = web_contents()->GetURL();
TabSpecificContentSettings* content_settings =
TabSpecificContentSettings::FromWebContents(web_contents());
- const GeolocationSettingsState::StateMap& state_map =
- content_settings->geolocation_settings_state().state_map();
+ const ContentSettingsUsagesState::StateMap& state_map =
+ content_settings->geolocation_usages_state().state_map();
HostContentSettingsMap* settings_map =
profile()->GetHostContentSettingsMap();
- for (GeolocationSettingsState::StateMap::const_iterator it =
+ for (ContentSettingsUsagesState::StateMap::const_iterator it =
state_map.begin(); it != state_map.end(); ++it) {
settings_map->SetContentSetting(
ContentSettingsPattern::FromURLNoWildcard(it->first),

Powered by Google App Engine
This is Rietveld 408576698