summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreblake@chromium.org <eblake@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-28 16:06:10 +0000
committereblake@chromium.org <eblake@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-28 16:06:10 +0000
commit3558016807cbd948631c5954115f88e6b3702852 (patch)
treee9f4669a17d07bbc3eea2fafa3c49b0a3e4c6156
parent93ad19f40618e6a54bf04c25046b6f0f996fcf32 (diff)
downloadchromium_src-3558016807cbd948631c5954115f88e6b3702852.zip
chromium_src-3558016807cbd948631c5954115f88e6b3702852.tar.gz
chromium_src-3558016807cbd948631c5954115f88e6b3702852.tar.bz2
Merge 60760 - 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 TBR=allanwoj@chromium.org Review URL: http://codereview.chromium.org/3452031 git-svn-id: svn://svn.chromium.org/chrome/branches/536/src@60792 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/geolocation/gateway_data_provider_common.cc4
-rw-r--r--chrome/browser/geolocation/gateway_data_provider_common.h14
-rw-r--r--chrome/browser/geolocation/gateway_data_provider_common_unittest.cc6
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();
}