summaryrefslogtreecommitdiffstats
path: root/chrome/browser/geolocation
diff options
context:
space:
mode:
authorjoth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-05 11:42:30 +0000
committerjoth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-05 11:42:30 +0000
commitdee5464259bc255197d56b250f66ee80b380c2c5 (patch)
tree95d0d00734fa78896b9cf07feb85bcefb2f49d74 /chrome/browser/geolocation
parent45ba25db8d83aa2f392e997b89a717dc08e3c4c6 (diff)
downloadchromium_src-dee5464259bc255197d56b250f66ee80b380c2c5.zip
chromium_src-dee5464259bc255197d56b250f66ee80b380c2c5.tar.gz
chromium_src-dee5464259bc255197d56b250f66ee80b380c2c5.tar.bz2
Split out of reverted change http://src.chromium.org/viewvc/chrome?view=rev&revision=37989
Tidy up assertions to use CHECKs (Already reviewed as part of above change) BUG=none TEST=none Review URL: http://codereview.chromium.org/578013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38203 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/geolocation')
-rw-r--r--chrome/browser/geolocation/empty_device_data_provider.h2
-rw-r--r--chrome/browser/geolocation/wifi_data_provider_common.h3
-rw-r--r--chrome/browser/geolocation/wifi_data_provider_common_win.cc2
-rw-r--r--chrome/browser/geolocation/wifi_data_provider_linux.cc4
-rw-r--r--chrome/browser/geolocation/wifi_data_provider_mac.cc8
5 files changed, 10 insertions, 9 deletions
diff --git a/chrome/browser/geolocation/empty_device_data_provider.h b/chrome/browser/geolocation/empty_device_data_provider.h
index cf0d209..1c932fd 100644
--- a/chrome/browser/geolocation/empty_device_data_provider.h
+++ b/chrome/browser/geolocation/empty_device_data_provider.h
@@ -19,7 +19,7 @@ class EmptyDeviceDataProvider : public DeviceDataProviderImplBase<DataType> {
// DeviceDataProviderImplBase implementation
virtual bool StartDataProvider() { return true; }
virtual bool GetData(DataType *data) {
- assert(data);
+ DCHECK(data);
// This is all the data we can get - nothing.
return true;
}
diff --git a/chrome/browser/geolocation/wifi_data_provider_common.h b/chrome/browser/geolocation/wifi_data_provider_common.h
index f8b9a41..9836b42 100644
--- a/chrome/browser/geolocation/wifi_data_provider_common.h
+++ b/chrome/browser/geolocation/wifi_data_provider_common.h
@@ -7,6 +7,7 @@
#include <assert.h>
+#include "base/logging.h"
#include "base/string16.h"
#include "base/basictypes.h"
@@ -38,7 +39,7 @@ class GenericPollingPolicy : public PollingPolicyInterface {
} else if (polling_interval_ == DEFAULT_INTERVAL) {
polling_interval_ = NO_CHANGE_INTERVAL;
} else {
- assert(polling_interval_ == NO_CHANGE_INTERVAL ||
+ DCHECK(polling_interval_ == NO_CHANGE_INTERVAL ||
polling_interval_ == TWO_NO_CHANGE_INTERVAL);
polling_interval_ = TWO_NO_CHANGE_INTERVAL;
}
diff --git a/chrome/browser/geolocation/wifi_data_provider_common_win.cc b/chrome/browser/geolocation/wifi_data_provider_common_win.cc
index 211cbcd..6474c43 100644
--- a/chrome/browser/geolocation/wifi_data_provider_common_win.cc
+++ b/chrome/browser/geolocation/wifi_data_provider_common_win.cc
@@ -14,7 +14,7 @@ bool ConvertToAccessPointData(const NDIS_WLAN_BSSID& data,
AccessPointData *access_point_data) {
// Currently we get only MAC address, signal strength and SSID.
// TODO(steveblock): Work out how to get age, channel and signal-to-noise.
- assert(access_point_data);
+ DCHECK(access_point_data);
access_point_data->mac_address = MacAddressAsString16(data.MacAddress);
access_point_data->radio_signal_strength = data.Rssi;
// Note that _NDIS_802_11_SSID::Ssid::Ssid is not null-terminated.
diff --git a/chrome/browser/geolocation/wifi_data_provider_linux.cc b/chrome/browser/geolocation/wifi_data_provider_linux.cc
index 0ccff5f..268c5d2 100644
--- a/chrome/browser/geolocation/wifi_data_provider_linux.cc
+++ b/chrome/browser/geolocation/wifi_data_provider_linux.cc
@@ -80,7 +80,7 @@ LinuxWifiDataProvider::~LinuxWifiDataProvider() {
}
bool LinuxWifiDataProvider::GetData(WifiData *data) {
- assert(data);
+ DCHECK(data);
MutexLock lock(&data_mutex_);
*data = wifi_data_;
// If we've successfully completed a scan, indicate that we have all of the
@@ -219,7 +219,7 @@ bool IssueCommandAndParseResult(const char *command,
// Parse results.
- assert(access_points);
+ DCHECK(access_points);
access_points->clear();
std::string::size_type start = result.find(delimiter);
while (start != std::string::npos) {
diff --git a/chrome/browser/geolocation/wifi_data_provider_mac.cc b/chrome/browser/geolocation/wifi_data_provider_mac.cc
index f2692dd..4fb9f17 100644
--- a/chrome/browser/geolocation/wifi_data_provider_mac.cc
+++ b/chrome/browser/geolocation/wifi_data_provider_mac.cc
@@ -39,7 +39,7 @@ OsxWifiDataProvider::~OsxWifiDataProvider() {
}
bool OsxWifiDataProvider::GetData(WifiData *data) {
- assert(data);
+ DCHECK(data);
MutexLock lock(&data_mutex_);
*data = wifi_data_;
// If we've successfully completed a scan, indicate that we have all of the
@@ -63,7 +63,7 @@ void OsxWifiDataProvider::Run() {
dlsym(apple_80211_library, "WirelessScanSplit"));
WirelessDetach_function_ = reinterpret_cast<WirelessDetachFunction>(
dlsym(apple_80211_library, "WirelessDetach"));
- assert(WirelessAttach_function_ &&
+ DCHECK(WirelessAttach_function_ &&
WirelessScanSplit_function_ &&
WirelessDetach_function_);
@@ -97,8 +97,8 @@ void OsxWifiDataProvider::Run() {
void OsxWifiDataProvider::GetAccessPointData(
WifiData::AccessPointDataSet *access_points) {
- assert(access_points);
- assert(WirelessScanSplit_function_);
+ DCHECK(access_points);
+ DCHECK(WirelessScanSplit_function_);
CFArrayRef managed_access_points = NULL;
CFArrayRef adhoc_access_points = NULL;
if ((*WirelessScanSplit_function_)(wifi_context_,