diff options
author | allanwoj@chromium.org <allanwoj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-28 08:47:19 +0000 |
---|---|---|
committer | allanwoj@chromium.org <allanwoj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-28 08:47:19 +0000 |
commit | 83d7b4e943c80e388d2886636bb5fe1f8477ccb0 (patch) | |
tree | 90c512b1215f51eed88dd83c82daae97f49f821b /chrome/browser/geolocation | |
parent | 1f830eb0bdf991843bfb0fe26dc1970318475e71 (diff) | |
download | chromium_src-83d7b4e943c80e388d2886636bb5fe1f8477ccb0.zip chromium_src-83d7b4e943c80e388d2886636bb5fe1f8477ccb0.tar.gz chromium_src-83d7b4e943c80e388d2886636bb5fe1f8477ccb0.tar.bz2 |
Change name of PollingPolicyInterface.
Renamed PollingPolicyInterface to GatewayPollingPolicyInterface as there was a name conflict with one in wifi_data_provider_common.h
BUG=None
TEST=Chrome compiles.
Review URL: http://codereview.chromium.org/3453026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60760 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/geolocation')
3 files changed, 12 insertions, 12 deletions
diff --git a/chrome/browser/geolocation/gateway_data_provider_common.cc b/chrome/browser/geolocation/gateway_data_provider_common.cc index cd9d189..363967c 100644 --- a/chrome/browser/geolocation/gateway_data_provider_common.cc +++ b/chrome/browser/geolocation/gateway_data_provider_common.cc @@ -85,6 +85,6 @@ void GatewayDataProviderCommon::ScheduleNextScan(int interval) { &GatewayDataProviderCommon::DoRouterScanTask), interval); } -PollingPolicyInterface* GatewayDataProviderCommon::NewPollingPolicy() { - return new GenericPollingPolicy; +GatewayPollingPolicyInterface* GatewayDataProviderCommon::NewPollingPolicy() { + return new GenericGatewayPollingPolicy; } diff --git a/chrome/browser/geolocation/gateway_data_provider_common.h b/chrome/browser/geolocation/gateway_data_provider_common.h index 1f8693c..6bc6f90 100644 --- a/chrome/browser/geolocation/gateway_data_provider_common.h +++ b/chrome/browser/geolocation/gateway_data_provider_common.h @@ -19,9 +19,9 @@ const int kNoRouterInterval = 30 * 1000; // 30s } // Allows sharing and mocking of the update polling policy function. -class PollingPolicyInterface { +class GatewayPollingPolicyInterface { public: - virtual ~PollingPolicyInterface() {} + virtual ~GatewayPollingPolicyInterface() {} // Returns the polling interval to be used when we are connected to a router // via Ethernet. @@ -62,14 +62,14 @@ class GatewayDataProviderCommon // Returns ownership. Will be called from the worker thread. virtual GatewayApiInterface* NewGatewayApi() = 0; // Returns ownership. Will be called from the worker thread. - virtual PollingPolicyInterface* NewPollingPolicy(); + virtual GatewayPollingPolicyInterface* NewPollingPolicy(); private: - class GenericPollingPolicy : public PollingPolicyInterface { + class GenericGatewayPollingPolicy : public GatewayPollingPolicyInterface { public: - GenericPollingPolicy() {} + GenericGatewayPollingPolicy() {} - // PollingPolicyInterface + // GatewayPollingPolicyInterface virtual int PollingInterval() { return kDefaultInterval; } virtual int NoRouterInterval() { return kNoRouterInterval; } }; @@ -91,7 +91,7 @@ class GatewayDataProviderCommon scoped_ptr<GatewayApiInterface> gateway_api_; GatewayData gateway_data_; // Controls the polling update interval. - scoped_ptr<PollingPolicyInterface> polling_policy_; + scoped_ptr<GatewayPollingPolicyInterface> polling_policy_; // Holder for the tasks which run on the thread; takes care of cleanup. ScopedRunnableMethodFactory<GatewayDataProviderCommon> task_factory_; diff --git a/chrome/browser/geolocation/gateway_data_provider_common_unittest.cc b/chrome/browser/geolocation/gateway_data_provider_common_unittest.cc index 7aede75a..1f8b072 100644 --- a/chrome/browser/geolocation/gateway_data_provider_common_unittest.cc +++ b/chrome/browser/geolocation/gateway_data_provider_common_unittest.cc @@ -57,7 +57,7 @@ class MessageLoopQuitListener DeviceDataProvider<GatewayData>* provider_; }; -class MockGatewayPollingPolicy : public PollingPolicyInterface { +class MockGatewayPollingPolicy : public GatewayPollingPolicyInterface { public: MockGatewayPollingPolicy() { ON_CALL(*this, PollingInterval()) @@ -66,7 +66,7 @@ class MockGatewayPollingPolicy : public PollingPolicyInterface { .WillByDefault(Return(1)); } - // PollingPolicyInterface + // GatewayPollingPolicyInterface MOCK_METHOD0(PollingInterval, int()); MOCK_METHOD0(NoRouterInterval, int()); }; @@ -83,7 +83,7 @@ class GatewayDataProviderCommonWithMock : public GatewayDataProviderCommon { CHECK(new_gateway_api_ != NULL); return new_gateway_api_.release(); } - virtual PollingPolicyInterface* NewPollingPolicy() { + virtual GatewayPollingPolicyInterface* NewPollingPolicy() { CHECK(new_polling_policy_ != NULL); return new_polling_policy_.release(); } |