Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Unified Diff: device/geolocation/wifi_data_provider_mac.mm

Issue 2833273002: Geolocation cleanup: use unique_ptr<>s and rename New{WlanApi/PollingPolicy} to CreateBla() (Closed)
Patch Set: reillyg@s nits Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/geolocation/wifi_data_provider_mac.h ('k') | device/geolocation/wifi_data_provider_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/geolocation/wifi_data_provider_mac.mm
diff --git a/device/geolocation/wifi_data_provider_mac.mm b/device/geolocation/wifi_data_provider_mac.mm
index a5f978bf7f70b1d5268df0d109625ba2ca6b5f8d..6edf1793bc43ad6f51acbfa7523951649218d8fe 100644
--- a/device/geolocation/wifi_data_provider_mac.mm
+++ b/device/geolocation/wifi_data_provider_mac.mm
@@ -10,6 +10,7 @@
#include "base/mac/scoped_nsautorelease_pool.h"
#include "base/mac/scoped_nsobject.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/sys_string_conversions.h"
#include "device/geolocation/wifi_data_provider_common.h"
@@ -122,14 +123,15 @@ WifiDataProviderMac::WifiDataProviderMac() {}
WifiDataProviderMac::~WifiDataProviderMac() {}
-WifiDataProviderMac::WlanApiInterface* WifiDataProviderMac::NewWlanApi() {
- return new CoreWlanApi();
+std::unique_ptr<WifiDataProviderMac::WlanApiInterface>
+WifiDataProviderMac::CreateWlanApi() {
+ return base::MakeUnique<CoreWlanApi>();
}
-WifiPollingPolicy* WifiDataProviderMac::NewPollingPolicy() {
- return new GenericWifiPollingPolicy<
+std::unique_ptr<WifiPollingPolicy> WifiDataProviderMac::CreatePollingPolicy() {
+ return base::MakeUnique<GenericWifiPollingPolicy<
kDefaultPollingInterval, kNoChangePollingInterval,
- kTwoNoChangePollingInterval, kNoWifiPollingIntervalMilliseconds>;
+ kTwoNoChangePollingInterval, kNoWifiPollingIntervalMilliseconds>>();
}
} // namespace device
« no previous file with comments | « device/geolocation/wifi_data_provider_mac.h ('k') | device/geolocation/wifi_data_provider_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698