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

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

Issue 7484072: Migrate geolocation settings to host content settings map. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 4 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 3c517318fc82bd8c14bd545900bd6aa22dd0ab07..c54a5d7dbdf01746983ecd9141cae791fc266742 100644
--- a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
+++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
@@ -9,7 +9,6 @@
#include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/browser/content_settings/tab_specific_content_settings.h"
#include "chrome/browser/favicon/favicon_tab_helper.h"
-#include "chrome/browser/geolocation/geolocation_content_settings_map.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h"
@@ -46,7 +45,7 @@ int GetIdForContentType(const ContentSettingsTypeIdEntry* entries,
return 0;
}
-}
+} // namespace
class ContentSettingTitleAndLinkModel : public ContentSettingBubbleModel {
public:
@@ -463,12 +462,17 @@ class ContentSettingDomainListBubbleModel
tab_contents()->content_settings();
const GeolocationSettingsState::StateMap& state_map =
content_settings->geolocation_settings_state().state_map();
- GeolocationContentSettingsMap* settings_map =
- profile()->GetGeolocationContentSettingsMap();
+ HostContentSettingsMap* settings_map =
+ profile()->GetHostContentSettingsMap();
+
for (GeolocationSettingsState::StateMap::const_iterator it =
state_map.begin(); it != state_map.end(); ++it) {
- settings_map->SetContentSetting(it->first, embedder_url,
- CONTENT_SETTING_DEFAULT);
+ settings_map->SetContentSetting(
+ ContentSettingsPattern::FromURLNoWildcard(it->first),
+ ContentSettingsPattern::FromURLNoWildcard(embedder_url),
+ CONTENT_SETTINGS_TYPE_GEOLOCATION,
+ std::string(),
+ CONTENT_SETTING_DEFAULT);
}
}
};
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698