summaryrefslogtreecommitdiffstats
path: root/chrome/browser/geolocation/location_arbitrator.h
diff options
context:
space:
mode:
authorjoth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-04 11:12:43 +0000
committerjoth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-04 11:12:43 +0000
commit10e59f313e152793f810ac60288e9a3516aba8a3 (patch)
tree092a11226e8d577aa77721efe57926e729d58fdc /chrome/browser/geolocation/location_arbitrator.h
parentc65769622ed9c97688cf0662f2cd2da77a7f5bc2 (diff)
downloadchromium_src-10e59f313e152793f810ac60288e9a3516aba8a3.zip
chromium_src-10e59f313e152793f810ac60288e9a3516aba8a3.tar.gz
chromium_src-10e59f313e152793f810ac60288e9a3516aba8a3.tar.bz2
Fix crash when permission request received from extension.
BUG=http://crbug.com/37196 TEST=TODO Review URL: http://codereview.chromium.org/667006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40621 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/geolocation/location_arbitrator.h')
-rw-r--r--chrome/browser/geolocation/location_arbitrator.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/browser/geolocation/location_arbitrator.h b/chrome/browser/geolocation/location_arbitrator.h
index 96e1de2..98477c7 100644
--- a/chrome/browser/geolocation/location_arbitrator.h
+++ b/chrome/browser/geolocation/location_arbitrator.h
@@ -8,6 +8,7 @@
#include "base/ref_counted.h"
class AccessTokenStore;
+class LocationProviderBase;
class URLRequestContextGetter;
struct Geoposition;
@@ -62,9 +63,11 @@ class GeolocationArbitrator : public base::RefCounted<GeolocationArbitrator> {
// via AddObserver(). Returns true if the observer was removed.
virtual bool RemoveObserver(Delegate* delegate) = 0;
- // TODO(joth): This is a stop-gap for testing; once we have decoupled
- // provider factory we should extract mock creation from the arbitrator.
- static void SetUseMockProvider(bool use_mock);
+ // For testing, a factory functino can be set which will be used to create
+ // a specified test provider. Pass NULL to reset to the default behavior.
+ typedef LocationProviderBase* (*LocationProviderFactoryFunction)(void);
+ static void SetProviderFactoryForTest(
+ LocationProviderFactoryFunction factory_function);
protected:
friend class base::RefCounted<GeolocationArbitrator>;