summaryrefslogtreecommitdiffstats
path: root/chrome/browser/profile.cc
diff options
context:
space:
mode:
authorbulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-11 13:08:52 +0000
committerbulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-11 13:08:52 +0000
commit8b4b84eee1eaa6a77c34f66f7278039004657896 (patch)
treed8ff62fa586a6dc4d5859453037e1821f2a89bc2 /chrome/browser/profile.cc
parent5ea92a92e9fa26334db821da688d3c46e295d19c (diff)
downloadchromium_src-8b4b84eee1eaa6a77c34f66f7278039004657896.zip
chromium_src-8b4b84eee1eaa6a77c34f66f7278039004657896.tar.gz
chromium_src-8b4b84eee1eaa6a77c34f66f7278039004657896.tar.bz2
Geolocation: checks pending requests with the same origin when receiving the infobar response.
Moves GeolocationPermissionContext from GeolocationDispatcherHost up to profile. TEST=GeolocationPermissionContextTests.MultipleOrigins or manual: open two tabs from the same origin with geolocation. Check both info bars are created. Reply to only one of them, check the other is gone. BUG=40527 Review URL: http://codereview.chromium.org/1585036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46910 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profile.cc')
-rw-r--r--chrome/browser/profile.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index a5ade1e..be95189 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -33,6 +33,7 @@
#include "chrome/browser/favicon_service.h"
#include "chrome/browser/find_bar_state.h"
#include "chrome/browser/geolocation/geolocation_content_settings_map.h"
+#include "chrome/browser/geolocation/geolocation_permission_context.h"
#include "chrome/browser/spellcheck_host.h"
#include "chrome/browser/transport_security_persister.h"
#include "chrome/browser/history/history.h"
@@ -454,6 +455,10 @@ class OffTheRecordProfileImpl : public Profile,
return profile_->GetGeolocationContentSettingsMap();
}
+ virtual GeolocationPermissionContext* GetGeolocationPermissionContext() {
+ return profile_->GetGeolocationPermissionContext();
+ }
+
virtual Blacklist* GetPrivacyBlacklist() {
return profile_->GetPrivacyBlacklist();
}
@@ -1116,6 +1121,12 @@ GeolocationContentSettingsMap* ProfileImpl::GetGeolocationContentSettingsMap() {
return geolocation_content_settings_map_.get();
}
+GeolocationPermissionContext* ProfileImpl::GetGeolocationPermissionContext() {
+ if (!geolocation_permission_context_.get())
+ geolocation_permission_context_ = new GeolocationPermissionContext(this);
+ return geolocation_permission_context_.get();
+}
+
Blacklist* ProfileImpl::GetPrivacyBlacklist() {
if (!CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnablePrivacyBlacklists))