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

Unified Diff: content/browser/geolocation/geolocation_provider_impl.cc

Issue 1874893002: Convert //content/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: content/browser/geolocation/geolocation_provider_impl.cc
diff --git a/content/browser/geolocation/geolocation_provider_impl.cc b/content/browser/geolocation/geolocation_provider_impl.cc
index c490907c792ab3a18439d711d1f40b62bcbe24e8..f3d6e37e062bf002b3b4050ab5c6cdb5e17a19e0 100644
--- a/content/browser/geolocation/geolocation_provider_impl.cc
+++ b/content/browser/geolocation/geolocation_provider_impl.cc
@@ -9,6 +9,7 @@
#include "base/callback.h"
#include "base/location.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/memory/singleton.h"
#include "base/single_thread_task_runner.h"
#include "content/browser/geolocation/location_arbitrator_impl.h"
@@ -20,12 +21,12 @@ GeolocationProvider* GeolocationProvider::GetInstance() {
return GeolocationProviderImpl::GetInstance();
}
-scoped_ptr<GeolocationProvider::Subscription>
+std::unique_ptr<GeolocationProvider::Subscription>
GeolocationProviderImpl::AddLocationUpdateCallback(
const LocationUpdateCallback& callback,
bool enable_high_accuracy) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- scoped_ptr<GeolocationProvider::Subscription> subscription;
+ std::unique_ptr<GeolocationProvider::Subscription> subscription;
if (enable_high_accuracy) {
subscription = high_accuracy_callbacks_.Add(callback);
} else {
@@ -169,10 +170,11 @@ void GeolocationProviderImpl::CleanUp() {
arbitrator_.reset();
}
-scoped_ptr<LocationArbitrator> GeolocationProviderImpl::CreateArbitrator() {
+std::unique_ptr<LocationArbitrator>
+GeolocationProviderImpl::CreateArbitrator() {
LocationArbitratorImpl::LocationUpdateCallback callback = base::Bind(
&GeolocationProviderImpl::OnLocationUpdate, base::Unretained(this));
- return make_scoped_ptr(new LocationArbitratorImpl(callback));
+ return base::WrapUnique(new LocationArbitratorImpl(callback));
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698