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

Side by Side Diff: content/browser/geolocation/geolocation_provider_impl.cc

Issue 1545243002: Convert Pass()→std::move() in //content/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/geolocation/geolocation_provider_impl.h" 5 #include "content/browser/geolocation/geolocation_provider_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 19 matching lines...) Expand all
30 } else { 30 } else {
31 subscription = low_accuracy_callbacks_.Add(callback); 31 subscription = low_accuracy_callbacks_.Add(callback);
32 } 32 }
33 33
34 OnClientsChanged(); 34 OnClientsChanged();
35 if (position_.Validate() || 35 if (position_.Validate() ||
36 position_.error_code != Geoposition::ERROR_CODE_NONE) { 36 position_.error_code != Geoposition::ERROR_CODE_NONE) {
37 callback.Run(position_); 37 callback.Run(position_);
38 } 38 }
39 39
40 return subscription.Pass(); 40 return subscription;
41 } 41 }
42 42
43 void GeolocationProviderImpl::UserDidOptIntoLocationServices() { 43 void GeolocationProviderImpl::UserDidOptIntoLocationServices() {
44 DCHECK_CURRENTLY_ON(BrowserThread::UI); 44 DCHECK_CURRENTLY_ON(BrowserThread::UI);
45 bool was_permission_granted = user_did_opt_into_location_services_; 45 bool was_permission_granted = user_did_opt_into_location_services_;
46 user_did_opt_into_location_services_ = true; 46 user_did_opt_into_location_services_ = true;
47 if (IsRunning() && !was_permission_granted) 47 if (IsRunning() && !was_permission_granted)
48 InformProvidersPermissionGranted(); 48 InformProvidersPermissionGranted();
49 } 49 }
50 50
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 arbitrator_ = NULL; 171 arbitrator_ = NULL;
172 } 172 }
173 173
174 LocationArbitrator* GeolocationProviderImpl::CreateArbitrator() { 174 LocationArbitrator* GeolocationProviderImpl::CreateArbitrator() {
175 LocationArbitratorImpl::LocationUpdateCallback callback = base::Bind( 175 LocationArbitratorImpl::LocationUpdateCallback callback = base::Bind(
176 &GeolocationProviderImpl::OnLocationUpdate, base::Unretained(this)); 176 &GeolocationProviderImpl::OnLocationUpdate, base::Unretained(this));
177 return new LocationArbitratorImpl(callback); 177 return new LocationArbitratorImpl(callback);
178 } 178 }
179 179
180 } // namespace content 180 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/geofencing/geofencing_service.cc ('k') | content/browser/geolocation/geolocation_service_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698