diff options
author | bulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-11 13:08:52 +0000 |
---|---|---|
committer | bulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-11 13:08:52 +0000 |
commit | 8b4b84eee1eaa6a77c34f66f7278039004657896 (patch) | |
tree | d8ff62fa586a6dc4d5859453037e1821f2a89bc2 /chrome/test/testing_profile.h | |
parent | 5ea92a92e9fa26334db821da688d3c46e295d19c (diff) | |
download | chromium_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/test/testing_profile.h')
-rw-r--r-- | chrome/test/testing_profile.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/test/testing_profile.h b/chrome/test/testing_profile.h index 1edf867..7ceaec6 100644 --- a/chrome/test/testing_profile.h +++ b/chrome/test/testing_profile.h @@ -15,6 +15,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/host_content_settings_map.h" #include "chrome/browser/history/history.h" #include "chrome/browser/in_process_webkit/webkit_context.h" @@ -205,6 +206,13 @@ class TestingProfile : public Profile { } return geolocation_content_settings_map_.get(); } + virtual GeolocationPermissionContext* GetGeolocationPermissionContext() { + if (!geolocation_permission_context_.get()) { + geolocation_permission_context_ = + new GeolocationPermissionContext(this); + } + return geolocation_permission_context_.get(); + } virtual HostZoomMap* GetHostZoomMap() { return NULL; } void set_session_service(SessionService* session_service); virtual SessionService* GetSessionService() { return session_service_.get(); } @@ -334,6 +342,7 @@ class TestingProfile : public Profile { scoped_refptr<HostContentSettingsMap> host_content_settings_map_; scoped_refptr<GeolocationContentSettingsMap> geolocation_content_settings_map_; + scoped_refptr<GeolocationPermissionContext> geolocation_permission_context_; // Find bar state. Created lazily by GetFindBarState(). scoped_ptr<FindBarState> find_bar_state_; |