Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "device/geolocation/geolocation_config.h" | |
| 6 | |
| 7 #include "base/bind.h" | |
| 8 #include "mojo/public/cpp/bindings/strong_binding.h" | |
| 9 | |
| 10 namespace device { | |
| 11 | |
| 12 GeolocationConfig::GeolocationConfig() {} | |
| 13 | |
| 14 GeolocationConfig::~GeolocationConfig() {} | |
| 15 | |
| 16 // static | |
| 17 void GeolocationConfig::Create( | |
| 18 const service_manager::BindSourceInfo& source_info, | |
| 19 mojom::GeolocationConfigRequest request) { | |
| 20 mojo::MakeStrongBinding(base::MakeUnique<GeolocationConfig>(), | |
| 21 std::move(request)); | |
| 22 } | |
| 23 | |
| 24 void GeolocationConfig::IsHighAccuracyLocationBeingCaptured( | |
| 25 IsHighAccuracyLocationBeingCapturedCallback callback) { | |
| 26 bool high_accuracy = | |
| 27 GeolocationProvider::GetInstance()->HighAccuracyLocationInUse(); | |
|
blundell
2017/07/12 13:28:06
nit: just inline this call into the invocation of
asimjour1
2017/07/12 18:03:58
Done.
| |
| 28 std::move(callback).Run(high_accuracy); | |
| 29 return; | |
|
blundell
2017/07/12 13:28:06
nit: eliminate the return
asimjour1
2017/07/12 18:03:58
Done.
| |
| 30 } | |
| 31 | |
| 32 } // namespace device | |
| OLD | NEW |